Changes for 64bit clean printf format strings.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36810 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2013-07-03 06:46:41 +00:00
parent 8082fb58c1
commit 022d588467
32 changed files with 223 additions and 168 deletions

View file

@ -1370,7 +1370,7 @@ NSLog(@"_processTag <%@%@ %@>", flag?@"/": @"", tag, attributes);
{
if (len < 8)
{
unsigned int val;
uint32_t val;
char buf[8];
memcpy(buf, ep + 1, len - 1);
@ -1379,12 +1379,12 @@ NSLog(@"_processTag <%@%@ %@>", flag?@"/": @"", tag, attributes);
if (sscanf(buf, "x%x;", &val))
{
// &#xhh; hex value
return [[NSString alloc] initWithFormat: @"%C", val];
return [[NSString alloc] initWithFormat: @"%C", (unichar)val];
}
else if (sscanf(buf, "%d;", &val))
{
// &ddd; decimal value
return [[NSString alloc] initWithFormat: @"%C", val];
return [[NSString alloc] initWithFormat: @"%C", (unichar)val];
}
}
}