Bug#826333: [Bug-freedink] Bug#826333: Saving new map not arch-independent

Sylvain beuc at beuc.net
Sun Jun 12 16:19:45 UTC 2016


Control: tags -1 fixed-upstream
thanks

Hi,

Thanks for the report.

This is due to an incorrect computation of the screen index in
DINK.DAT.  Opening and saving the file in a map packer such as
WinDinkedit should fix the file size.

The issue is not so much 32 vs. 64 bits than the fact struct small_map
was cleaned-up and shortened, so the index computation resulted in
far larger indices.

AFAICS this is already fixed in the in-progress 109.0 version.

Cheers!
Sylvain

On Sat, Jun 04, 2016 at 12:07:13PM -0400, Bas Wijnen wrote:
> Package: freedink
> Version: 108.4-1
> Severity: important
> 
> See http://www.dinknetwork.com/forum.cgi?MID=195069#195357 :
> 
> > In src/freedinkedit.c, lines 595 and 596, the code uses sizeof(struct
> > small_map), but that struct is not defined in a way to keep its size the same
> > on all architectures.
> > 
> > Either that should be done by changing the "int"s into "int32_t"s in its
> > definition (and adding "__attribute__((packed))"; it may work without it, but
> > is appropriate for this situation), or (easier but worse for maintenance) it
> > should be replaced by the number, as in save_map in src/dinkvar.c: 31280
> > (line 1044, which includes a comment warning about this exact problem; see
> > what I mean by "worse for maintenance"?)
> 
> When using the proper solution, that line in save_map should also be changed to
> use sizeof(struct small_map).
> 
> For context, the problem is described earlier on that page:
> 
> http://www.dinknetwork.com/forum.cgi?MID=195069#195091 :
> 
> > When I add one square, the map file grows to 437.9 KB. Then at 10 screens it
> > becomes 750.7 KB, then 1.3 MB, then 2.1MB, then 3.4, 5.6, 9.3, 15.3, 25.2,
> > 41.6, 68.5, 112.8, etc....
> 
> -- System Information:
> Debian Release: stretch/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
> Foreign Architectures: mipsel, armhf, i386
> 
> Kernel: Linux 4.4.0-1-amd64 (SMP w/2 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
> 
> Versions of packages freedink depends on:
> ii  freedink-dfarc   3.12-1+b1
> ii  freedink-engine  108.4-1
> 
> freedink recommends no packages.
> 
> freedink suggests no packages.
> 
> -- no debconf information



More information about the Pkg-games-devel mailing list