Fixed byte ordering bugs.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 05 Apr 2002 18:05:50 +0000
changeset 175 45e423c38ff8
parent 174 d1a31e51f915
child 176 4a996749e39d
Fixed byte ordering bugs.
archivers/grp.c
--- a/archivers/grp.c	Fri Apr 05 09:06:21 2002 +0000
+++ b/archivers/grp.c	Fri Apr 05 18:05:50 2002 +0000
@@ -206,6 +206,8 @@
     if (__PHYSFS_platformRead(*fh, count, sizeof (PHYSFS_sint32), 1) != 1)
         goto openGrp_failed;
 
+    *count = PHYSFS_swapSLE32(*count);
+
     return(1);
 
 openGrp_failed:
@@ -361,6 +363,7 @@
 
         BAIL_IF_MACRO(__PHYSFS_platformRead(fh, buf, 12, 1) != 1, NULL, -1);
         BAIL_IF_MACRO(__PHYSFS_platformRead(fh, &l, sizeof (l), 1) != 1, NULL, -1);
+        l = PHYSFS_swapSLE32(l);
 
         buf[12] = '\0';  /* FILENAME.EXT is all you get. */