Package: supertransball2 Version: 1.5-2 Severity: important Tags: patch Hi,
the patch "02_unix-paths-fixup" contains a badly coded fix that makes the configuration file to be recreated each time the game is launched. The attached patch fix it and has been fully tested on i386 arch. Reagrds. -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/dash Kernel: Linux 2.6.11-mh Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) (ignored: LC_ALL set to [EMAIL PROTECTED]) Versions of packages supertransball2 depends on: ii libc6 2.3.5-6 GNU C Library: Shared libraries an ii libgcc1 1:4.0.2-2 GCC support library ii libsdl-image1 1.2.4-1 image loading library for Simple D ii libsdl-mixer1 1.2.6-1.1 mixer library for Simple DirectMed ii libsdl-sge 020904-5 extension of graphic functions for ii libsdl-sound1 1.0.1-5 Decoder of several sound file form ii libsdl1.2debi 1.2.7+1.2.8cvs20041007-5.3 Simple DirectMedia Layer hi libstdc++5 1:3.3.6-7 The GNU Standard C++ Library v3 ii supertransbal 1.5-2 Data files for a thrust type of ga supertransball2 recommends no packages. -- no debconf information
#! /bin/sh /usr/share/dpatch/dpatch-run ## 03_config_patch_fixup JusTiCe8 <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: patch "UNIX paths fixup" use bad config file checks and makes it to be ## DP: always recreated with default values. @DPATCH@ --- supertransball2-1.5.orig/sources/main.cpp +++ supertransball2-1.5/sources/main.cpp @@ -142,12 +141,15 @@ chdir(confdir); mkdir("replays",mode); mkdir("high",mode); - - cfg=fopen("transball.cfg","w"); - if (fseek(cfg,0,SEEK_END)==0) { - fprintf(cfg,"%s","113 97 111 112 32 13 282"); - } - fclose(cfg); + + cfg=fopen("transball.cfg", "r"); + if (!cfg) + { + cfg=fopen("transball.cfg", "w"); + fprintf(cfg,"%s","113 97 111 112 32 13 282"); + } + + fclose(cfg); printf("Configuration: %s\n",confdir); printf("Data: %s\n",datadir);