archivers/grp.c
changeset 175 45e423c38ff8
parent 163 fc2b8ee5b420
child 194 09c353d30cd4
equal deleted inserted replaced
174:d1a31e51f915 175:45e423c38ff8
   204     } /* if */
   204     } /* if */
   205 
   205 
   206     if (__PHYSFS_platformRead(*fh, count, sizeof (PHYSFS_sint32), 1) != 1)
   206     if (__PHYSFS_platformRead(*fh, count, sizeof (PHYSFS_sint32), 1) != 1)
   207         goto openGrp_failed;
   207         goto openGrp_failed;
   208 
   208 
       
   209     *count = PHYSFS_swapSLE32(*count);
       
   210 
   209     return(1);
   211     return(1);
   210 
   212 
   211 openGrp_failed:
   213 openGrp_failed:
   212     if (*fh != NULL)
   214     if (*fh != NULL)
   213         __PHYSFS_platformClose(*fh);
   215         __PHYSFS_platformClose(*fh);
   359     {
   361     {
   360         PHYSFS_sint32 l = 0;
   362         PHYSFS_sint32 l = 0;
   361 
   363 
   362         BAIL_IF_MACRO(__PHYSFS_platformRead(fh, buf, 12, 1) != 1, NULL, -1);
   364         BAIL_IF_MACRO(__PHYSFS_platformRead(fh, buf, 12, 1) != 1, NULL, -1);
   363         BAIL_IF_MACRO(__PHYSFS_platformRead(fh, &l, sizeof (l), 1) != 1, NULL, -1);
   365         BAIL_IF_MACRO(__PHYSFS_platformRead(fh, &l, sizeof (l), 1) != 1, NULL, -1);
       
   366         l = PHYSFS_swapSLE32(l);
   364 
   367 
   365         buf[12] = '\0';  /* FILENAME.EXT is all you get. */
   368         buf[12] = '\0';  /* FILENAME.EXT is all you get. */
   366 
   369 
   367         if (__PHYSFS_platformStricmp((const char *) buf, name) == 0)
   370         if (__PHYSFS_platformStricmp((const char *) buf, name) == 0)
   368         {
   371         {