|
Rockbox mail archiveSubject: Fix a very nasty bug for DIGROM.TGZFix a very nasty bug for DIGROM.TGZ
From: alankorr <alankorr_at_subdimension.com>
Date: Fri, 18 Jan 2002 03:14:13 GMT 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 ! _____________________________________________________________________ // free anonymous email || forums \\ subZINE || anonymous browsing subDIMENSION -- http://www.subdimension.com Received on 2002-01-18 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |