mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-21 08:42:23 +00:00
Fix a logic error and an unitialized pointer that caused the game to
blow up when malloc_options were set to AJ.
This commit is contained in:
parent
c29f8c4ed5
commit
9723674f5e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=208763
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= xpacman
|
||||
PORTVERSION= 1.0
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= ftp://ftp.nvg.unit.no/pub/pacman/
|
||||
DISTNAME= pacman10
|
||||
|
19
games/xpacman/files/patch-board.cc
Normal file
19
games/xpacman/files/patch-board.cc
Normal file
@ -0,0 +1,19 @@
|
||||
--- board.cc.orig Tue Jul 18 11:03:22 1995
|
||||
+++ board.cc Mon Mar 10 20:52:04 2008
|
||||
@@ -119,7 +119,7 @@
|
||||
oldtemp=oldlist;
|
||||
while (oldtemp) { //delete elements in the now previous sprite list
|
||||
oldnext=oldtemp->next;
|
||||
- delete oldnext;
|
||||
+ delete oldtemp;
|
||||
oldtemp=oldnext;
|
||||
}
|
||||
if (zero && oldlist) { //personal thingie used for debug, not useful
|
||||
@@ -157,6 +157,7 @@
|
||||
void Board::sprite(DynamicElement *g) { //let dynamicelement be a sprite
|
||||
liststruct *temp=0,*last=0; //resets to null
|
||||
liststruct *ny=new liststruct; //get a new liststruct
|
||||
+ ny->next = 0;
|
||||
ny->g=g; //get pointer to element
|
||||
ny->gid=g->getgid(); //get it's grafical id
|
||||
g->getxy(&ny->x,&ny->y); //and coordinates
|
@ -7,4 +7,4 @@ is also bonus available, for a limited amount of time. An
|
||||
X gives just points, but a little pacman gives an extra
|
||||
life.
|
||||
|
||||
Author of this implementation: Roar Thronæs, roart@nvg.unit.no
|
||||
Author of this implementation: Roar Thronaes, roart@nvg.unit.no
|
||||
|
Loading…
Reference in New Issue
Block a user