Bug#546653: zaz: too many extra lives

Steve Cotton steve0001 at s.cotton.clara.co.uk
Mon Sep 14 21:05:26 UTC 2009


Package: zaz
Version: 0.2.9+dfsg1-1
Severity: minor
Tags: patch

When your score hits 10000 points, an extra life is awarded.
The statement controlling this mixes signed and unsigned ints:
    if ((score - extraLifeLastScore) > pointsForNewLife)
pointsForNewLife is a const int 10000.
score is an int, extraLifeLastScore is a uint; thus by the promotion rules
(score - extraLifeLastScore) is a uint too.

Every time you shoot a ball, your score goes down 5 points.
Because of this bug, going 10000 -> 9995 awards an extra life.  It also sets
extraLifeLastScore to zero, which means at 10000 points yet another life is
awarded.

Steve

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30.5 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages zaz depends on:
ii  libc6                      2.9-26        GNU C Library: Shared libraries
ii  libftgl2                   2.1.3~rc5-2   library to render text in OpenGL u
ii  libgcc1                    1:4.4.1-4     GCC support library
mangled  libgl1-mesa-glx [libgl1]   7.4.4-1       A free implementation of the OpenG
ii  libogg0                    1.1.4~dfsg-1  Ogg bitstream library
ii  libsdl-image1.2            1.2.7-2       image loading library for Simple D
ii  libsdl1.2debian            1.2.13-4+b1   Simple DirectMedia Layer
ii  libstdc++6                 4.4.1-4       The GNU Standard C++ Library v3
ii  libtheora0                 1.0-2.1       The Theora Video Compression Codec
ii  libvorbis0a                1.2.0.dfsg-6  The Vorbis General Audio Compressi
ii  libvorbisenc2              1.2.0.dfsg-6  The Vorbis General Audio Compressi
ii  libvorbisfile3             1.2.0.dfsg-6  The Vorbis General Audio Compressi
ii  ttf-freefont               20090104-3    Freefont Serif, Sans and Mono True
ii  zaz-data                   0.2.9+dfsg1-1 arcade action puzzle game - game d

zaz recommends no packages.

Versions of packages zaz suggests:
ii  zaz-dbg                    0.2.9+dfsg1-1 arcade action puzzle game - debug

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zaz__extra_life.patch
Type: text/x-c++
Size: 619 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20090914/5c78cb14/attachment.bin>


More information about the Pkg-games-devel mailing list