Article View: alt.games.gb
Article #323Duh!
From: John Deragon
Date: Tue, 22 Dec 1992 09:49
Date: Tue, 22 Dec 1992 09:49
43 lines
1372 bytes
1372 bytes
Sorry bout that... I posted the wrong context diff in the previous
message. (it is 4am after all!)
This is the correct one!
-- Seeker
----- BEGIN (CORRECT) CONTEXT DIFF -----
*** shlmisc.c Tue Dec 22 04:42:20 1992
--- oldshlmisc.c Tue Dec 22 04:42:13 1992
***************
*** 333,348 ****
int do_shiplist(shiptype **s, int *nextshipno)
{
int shipno;
! if (!(shipno = *nextshipno))
! return 0;
!
! if (!getship(s, shipno)) /* allocate memory, free in loop */
! return 0;
!
! if (!(*s)->alive) /* this prevents it from returning a dead ship */
! return 0; /* ie: try to scrap a dead ship JPD */
!
*nextshipno = (*s)->nextship;
return shipno;
}
--- 333,343 ----
int do_shiplist(shiptype **s, int *nextshipno)
{
int shipno;
+ if(!(shipno = *nextshipno))
+ return 0;
! if(!getship(s, shipno)) /* allocate memory, free in loop */
! return 0;
*nextshipno = (*s)->nextship;
return shipno;
}
Technical Details
Message-ID:
<9212220947.AA14087@JETHRO.CS.NYU.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!gatewayShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!gateway From: deragon@JETHRO.CS.NYU.EDU (John Deragon) Newsgroups: alt.games.gb Subject: Duh! Date: 22 Dec 1992 03:49:44 -0600 Organization: UTexas Mail-to-News Gateway Lines: 43 Sender: daemon@cs.utexas.edu Message-ID: <9212220947.AA14087@JETHRO.CS.NYU.EDU> NNTP-Posting-Host: cs.utexas.edu