mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Corrected two bugs in binary pl decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18551 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
eab903ecad
commit
1085dd0ed2
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-02-04 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSPropertyList.m: (GSBinaryPLParser -objectAtIndex:)
|
||||
Corrected two small errors for the new binary parser.
|
||||
|
||||
2004-02-07 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSKeyedUnarchiver.m: Changes to fix memory leaks.
|
||||
|
|
|
@ -2449,14 +2449,14 @@ OAppend(id obj, NSDictionary *loc, unsigned lev, unsigned step,
|
|||
[data getBytes: buffer range: NSMakeRange(counter, len)];
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
num = num*256 + buffer[counter + i];
|
||||
num = num*256 + buffer[i];
|
||||
}
|
||||
result = [NSNumber numberWithInt: num];
|
||||
}
|
||||
else if (next == 0x22)
|
||||
{
|
||||
// float number
|
||||
float in;
|
||||
NSSwappedFloat in;
|
||||
|
||||
[data getBytes: &in range: NSMakeRange(counter, sizeof(float))];
|
||||
result = [NSNumber numberWithFloat: NSSwapBigFloatToHost(in)];
|
||||
|
@ -2464,7 +2464,7 @@ OAppend(id obj, NSDictionary *loc, unsigned lev, unsigned step,
|
|||
else if (next == 0x23)
|
||||
{
|
||||
// double number
|
||||
double in;
|
||||
NSSwappedDouble in;
|
||||
|
||||
[data getBytes: &in range: NSMakeRange(counter, sizeof(double))];
|
||||
result = [NSNumber numberWithFloat: NSSwapBigDoubleToHost(in)];
|
||||
|
|
Loading…
Reference in a new issue