Bugfix generating unicode escapes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19677 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2004-07-03 17:48:35 +00:00
parent bab5235a5d
commit fe0bcb1de3
2 changed files with 5 additions and 4 deletions

View file

@ -4,6 +4,7 @@
dictionary which may not be mutable.
* Source/NSString.m: ([propertyList]) make decoded containers mutable
for compatibility with current MacOS-X
* Source/NSPropertlyList.m: Fix error generating unicode escapes.
2004-07-02 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -1314,13 +1314,13 @@ PString(NSString *obj, NSMutableData *output)
*ptr++ = '\\';
*ptr++ = 'U';
ptr[3] = (c & 0xf) > 9 ? (c & 0xf) + 'A' : (c & 0xf) + '0';
ptr[3] = (c & 15) > 9 ? (c & 15) + 55 : (c & 15) + 48;
c >>= 4;
ptr[2] = (c & 0xf) > 9 ? (c & 0xf) + 'A' : (c & 0xf) + '0';
ptr[2] = (c & 15) > 9 ? (c & 15) + 55 : (c & 15) + 48;
c >>= 4;
ptr[1] = (c & 0xf) > 9 ? (c & 0xf) + 'A' : (c & 0xf) + '0';
ptr[1] = (c & 15) > 9 ? (c & 15) + 55 : (c & 15) + 48;
c >>= 4;
ptr[0] = (c & 0xf) > 9 ? (c & 0xf) + 'A' : (c & 0xf) + '0';
ptr[0] = (c & 15) > 9 ? (c & 15) + 55 : (c & 15) + 48;
ptr += 4;
}
break;