mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Fixe byte swapping error in double.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3091 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a13312ac35
commit
f9ce7b42ab
2 changed files with 5 additions and 5 deletions
|
@ -704,8 +704,8 @@ readContentsOfFile(NSString* path, void** buf, unsigned* len, NSZone* zone)
|
|||
NSSwappedFloat nf;
|
||||
|
||||
[self deserializeBytes: &nf
|
||||
length: sizeof(NSSwappedFloat)
|
||||
atCursor: cursor];
|
||||
length: sizeof(NSSwappedFloat)
|
||||
atCursor: cursor];
|
||||
*(float*)data = NSSwapBigFloatToHost(nf);
|
||||
break;
|
||||
}
|
||||
|
@ -713,8 +713,8 @@ readContentsOfFile(NSString* path, void** buf, unsigned* len, NSZone* zone)
|
|||
NSSwappedDouble nd;
|
||||
|
||||
[self deserializeBytes: &nd
|
||||
length: sizeof(NSSwappedDouble)
|
||||
atCursor: cursor];
|
||||
length: sizeof(NSSwappedDouble)
|
||||
atCursor: cursor];
|
||||
*(double*)data = NSSwapBigDoubleToHost(nd);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue