mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Fix lookup of string encodings with high numeric values in encoding table
This commit is contained in:
parent
7ea49c252b
commit
8137b5a2a0
2 changed files with 10 additions and 2 deletions
|
@ -364,10 +364,10 @@ EntryForEncoding(NSStringEncoding enc)
|
|||
{
|
||||
struct _strenc_ *entry = 0;
|
||||
|
||||
if (enc > 0)
|
||||
if (enc != 0)
|
||||
{
|
||||
GSSetupEncodingTable();
|
||||
if (enc <= encTableSize)
|
||||
if (enc > 0 && enc <= encTableSize)
|
||||
{
|
||||
entry = encodingTable[enc];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue