lxdream.org :: Issues
lxdream 0.9.1
released Jun 29
Download Now

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000067lxdreamGD-Rompublic2009-03-18 04:392009-03-24 04:35
Reporterefry 
Assigned Tonkeynes 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000067: cdi bug x86_64 OS X
DescriptionHi Nathan,

I tried compiling lxdream with -arch x86_64 on OS X and I came across a bug with the cdi image loading code.

in cdi.c

The code to seek to the header_offset is broken for CDI_V35_ID

You need to cast to long when using a negative offset.

I changed the code to

    if( trail.cdi_version == CDI_V35_ID ) {
        fseek( f, -(long)trail.header_offset, SEEK_END );
    } else {
        fseek( f, trail.header_offset, SEEK_SET );
    }

which seemed to get it working again.

Regards,
Eric
TagsNo tags attached.
Milestone
Attached Files

- Relationships

-  Notes
(0000076)
nkeynes (administrator)
2009-03-24 04:35

Ouch that's subtle, and the compiler doesn't even have the grace to warn about the implicit conversion. Thanks for finding this. I've changed it as you suggested

- Issue History
Date Modified Username Field Change
2009-03-18 04:39 efry New Issue
2009-03-24 04:35 nkeynes Status new => resolved
2009-03-24 04:35 nkeynes Resolution open => fixed
2009-03-24 04:35 nkeynes Assigned To => nkeynes
2009-03-24 04:35 nkeynes Note Added: 0000076
.