[Bug 3026] PowerPC q3asm doesn't produce usable QVM files

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Fri Oct 12 15:17:53 EDT 2007


http://bugzilla.icculus.org/show_bug.cgi?id=3026





------- Comment #11 from tim at ngus.net  2007-10-12 15:17 EDT -------
bugzilla-daemon at icculus.org wrote:
> http://bugzilla.icculus.org/show_bug.cgi?id=3026

[I don't have my bugzilla credentials here, so PM]

This should fix it:

Index: code/tools/asm/q3asm.c
===================================================================
--- code/tools/asm/q3asm.c      (Revision 1193)
+++ code/tools/asm/q3asm.c      (Arbeitskopie)
@@ -1356,6 +1356,7 @@
        vmHeader_t      header;
        FILE    *f;
        int             headerSize;
+       int i;

        report( "%i total errors\n", errorCount );

@@ -1400,6 +1401,11 @@

        report( "Writing to %s\n", imageName );

+       // byte swap the header
+       for ( i = 0 ; i < sizeof( vmHeader_t ) / 4 ; i++ ) {
+               ((int *)&header)[i] = LittleLong( ((int *)&header)[i] );
+       }
+
        CreatePath( imageName );
        f = SafeOpenWrite( imageName );
        SafeWrite( f, &header, headerSize );

cu
Ludwig

-- 
 (o_   Ludwig Nussel
 //\   
 V_/_  http://www.suse.de/
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)


-- 
Configure bugmail: http://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.



More information about the quake3-bugzilla mailing list