mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +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
|
@ -1,3 +1,11 @@
|
|||
2021-06-17 Frederik Seiffert <frederik@algoriddim.com>
|
||||
|
||||
* Source/Additions/Unicode.m:
|
||||
Fix lookup of string encodings with high numeric values in
|
||||
encoding table when they are interpreted as negative numbers
|
||||
for some platforms/compilers (pertains
|
||||
NSUTF16*EndianStringEncoding and NSUTF32*StringEncoding).
|
||||
|
||||
2021-06-03 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/GNUstepBase/GSTLS.h: New session ivar for I/O handle.
|
||||
|
|
|
@ -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…
Reference in a new issue