package xmoto
reopen 335672
found 335672 0.1.7-1
kthxbye

On Tue, 2005-10-25 at 14:27 +0200, Samuel Mimram wrote:
> 
> Michel Daenzer wrote:
> > 
> > ** Warning ** : TextureManager::loadTexture() : texture
> > 'Textures/UI/Loading.png' not found or invalid
> > fatal exception : invalid or missing texture file
> > 
> > I tracked down the problem to an endianness bug when reading .dat files. The
> > attached patch makes it work fine for me.
> 
> Many thanks for the patch. I'll integrate it soon to the package and
> make sure that it gets integrated upstream.

Thanks for doing that, but unfortunately, what upstream integrated
doesn't fix the problem because LITTLE_ENDIAN is defined as well, at
least on powerpc. As I intentionally made the patch endianness agnostic,
why not just use that code everywhere? New patch to that effect
attached.


-- 
Earthling Michel Dänzer      |     Debian (powerpc), X and DRI developer
Libre software enthusiast    |   http://svcs.affero.net/rm.php?r=daenzer
--- xmoto-0.1.7.orig/src/VFileIO.cpp	2005-10-25 17:57:38.000000000 +0200
+++ xmoto-0.1.7/src/VFileIO.cpp	2005-10-31 12:17:22.911528652 +0100
@@ -835,14 +835,10 @@ namespace vapp {
           /* Read file size */
           int nSize;
 
-          #if defined(LITTLE_ENDIAN)
-            fread(&nSize,4,1,fp);
-          #elif defined(BIG_ENDIAN)
-            /* Patch by Michel Daenzer (applied 2005-10-25) */
-            unsigned char nSizeBuf[4];
-            fread(nSizeBuf,4,1,fp);
-            nSize = nSizeBuf[0] | nSizeBuf[1] << 8 | nSizeBuf[2] << 16 | nSizeBuf[3] << 24;
-          #endif
+          /* Patch by Michel Daenzer (applied 2005-10-25) */
+          unsigned char nSizeBuf[4];
+          fread(nSizeBuf,4,1,fp);
+          nSize = nSizeBuf[0] | nSizeBuf[1] << 8 | nSizeBuf[2] << 16 | nSizeBuf[3] << 24;
           
           if(m_nNumPackFiles < MAX_PACK_FILES) {
             m_PackFiles[m_nNumPackFiles].Name = cBuf;

Reply via email to