diff options
author | eivind <eivind@FreeBSD.org> | 1997-02-20 03:04:54 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1997-02-20 03:04:54 +0000 |
commit | 27eb6d09a03b6d51d025fafa9e46e0f64544d722 (patch) | |
tree | c09c18b60a67afd2e34d5a6138c86fe56288b8e3 /games/battlestar/com2.c | |
parent | 1a5d9e17d08eb1b79c5918e8596ba8f18ea36461 (diff) | |
download | FreeBSD-src-27eb6d09a03b6d51d025fafa9e46e0f64544d722.zip FreeBSD-src-27eb6d09a03b6d51d025fafa9e46e0f64544d722.tar.gz |
Remove buffer overflow and tempfile race, remove <sys/time.h> hack (and
need for it), change definition of setbit() macro and friends to be
compatible with <sys/param.h>.
The bugs were discovered and fixed as a result of the FreeBSD code audit.
Submitted by: Aaron Bornstein <aaronb@j51.com>, Mark Huizer <xaa@stack.nl>
Diffstat (limited to 'games/battlestar/com2.c')
-rw-r--r-- | games/battlestar/com2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/games/battlestar/com2.c b/games/battlestar/com2.c index 39148fc..e7d1af6 100644 --- a/games/battlestar/com2.c +++ b/games/battlestar/com2.c @@ -81,7 +81,7 @@ wearit() /* synonyms = {sheathe, sheath} */ setbit(wear,value); carrying -= objwt[value]; encumber -= objcumber[value]; - time++; + gtime++; printf("You are now wearing %s %s.\n",(objsht[value][n-1] == 's' ? "the" : "a"), objsht[value]); } else if (testbit(wear,value)) @@ -129,7 +129,7 @@ use() location[position].down = 160; whichway(location[position]); puts("The waves subside and it is possible to descend to the sea cave now."); - time++; + gtime++; return(-1); } } @@ -139,7 +139,7 @@ use() position = 224; else position = 229; - time++; + gtime++; return(0); } else if (position == FINAL) @@ -225,7 +225,7 @@ ravage() { while (wordtype[++wordnumber] != NOUNS && wordnumber <= wordcount); if (wordtype[wordnumber] == NOUNS && testbit(location[position].objects,wordvalue[wordnumber])){ - time++; + gtime++; switch(wordvalue[wordnumber]){ case NORMGOD: puts("You attack the goddess, and she screams as you beat her. She falls down"); @@ -272,7 +272,7 @@ ravage() follow() { - if (followfight == time){ + if (followfight == gtime){ puts("The Dark Lord leaps away and runs down secret tunnels and corridoors."); puts("You chase him through the darkness and splash in pools of water."); puts("You have cornered him. His laser sword extends as he steps forward."); @@ -282,7 +282,7 @@ follow() setbit(location[position].objects,AMULET); return(0); } - else if (followgod == time){ + else if (followgod == gtime){ puts("The goddess leads you down a steamy tunnel and into a high, wide chamber."); puts("She sits down on a throne."); position = 268; |