Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Fix a very nasty bug for DIGROM.TGZ
From: alankorr (alankorr_at_subdimension.com)
Date: 2002-01-18


Ok, new version to fix a very nasty bug :

  be_long_cluster =
(swabHI(le_short_fat[x+1])<<16)|swabHI(le_short_fat[x+0]);

the trouble is swabHI waits for a int parameter so we get an
undesirable signed extension.

to fix it use explicit unsigned extension :

  be_long_cluster =
(swabHI(le_short_fat[x+1])<<16)|((unsigned
short)swabHI(le_short_fat[x+0]));

I hope it is the only possible cause of problem of "invalid
FAT".

NOTE : le = little endian,
       be = big endian;
       swab = swap byte;
       SI = single integer (32-bit, gcc convention)
       HI = half integer (16-bit, gcc convention)
       QI = quarter integer (8-bit, gcc convention)

That's all, folks !



  • application/x-gzip-compressed attachment: digrom2.tgz
_____________________________________________________________________
// free anonymous email || forums \\ subZINE || anonymous browsing
            subDIMENSION -- http://www.subdimension.com



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa