Bug#493409: simutrans-pak64: FTBFS: Invalid image width

peter green plugwash at p10link.net
Mon Aug 4 02:03:08 UTC 2008


I have managed to fix it up so it doesn't error out but it produces 
different output on the two platforms. and i'm finding the code very 
hard to follow.

The first issue was a relatively simple one.

in utils/dr_rdpng.c some tweaking is required, replace the call to 
png_get_IHDR with

        //png_uint_32 is 64 bit on some architectures!
        png_uint_32 widthpu32,heightpu32;
        png_get_IHDR(
                png_ptr, info_ptr,
                &widthpu32, &heightpu32, &bit_depth, &color_type,
                &interlace_type, NULL, NULL
        );
        *width = widthpu32;
        *height = heightpu32;

The second problem is that the compbination of calculations in 
obj_node_t::write_data and obj_node_t::write_data_at leads to negative 
offsets. I dunno what the correct fix is for that (I tried both 
replacing 4 with sizeof(obj_besch_t) and replacing sizeof(obj_besch_t) 
with 4) both stopped it crashing neither made it produce the same output 
as the i386 version.







More information about the Pkg-games-devel mailing list