Removed temporary variable for clarity; Upsized text buffer in fallback to maximum possible size
This commit is contained in:
parent
8d9c8e4d5c
commit
614d9b34ad
2 changed files with 5 additions and 6 deletions
|
@ -201,15 +201,14 @@ static int bigwords(long id)
|
||||||
* crossing. */
|
* crossing. */
|
||||||
if (game.place[EGGS] == LOC_NOWHERE && game.place[TROLL] == LOC_NOWHERE && game.prop[TROLL] == TROLL_UNPAID)
|
if (game.place[EGGS] == LOC_NOWHERE && game.place[TROLL] == LOC_NOWHERE && game.prop[TROLL] == TROLL_UNPAID)
|
||||||
game.prop[TROLL] = TROLL_PAIDONCE;
|
game.prop[TROLL] = TROLL_PAIDONCE;
|
||||||
int k;
|
|
||||||
if (HERE(EGGS))
|
if (HERE(EGGS))
|
||||||
k = EGGS_VANISHED;
|
pspeak(EGGS, look, EGGS_VANISHED, true);
|
||||||
else if (game.loc == objects[EGGS].plac)
|
else if (game.loc == objects[EGGS].plac)
|
||||||
k = EGGS_HERE;
|
pspeak(EGGS, look, EGGS_HERE, true);
|
||||||
else
|
else
|
||||||
k = EGGS_DONE;
|
pspeak(EGGS, look, EGGS_DONE, true);
|
||||||
move(EGGS, objects[EGGS].plac);
|
move(EGGS, objects[EGGS].plac);
|
||||||
pspeak(EGGS, look, k, true);
|
|
||||||
return GO_CLEAROBJ;
|
return GO_CLEAROBJ;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
2
main.c
2
main.c
|
@ -137,7 +137,7 @@ static bool fallback_handler(struct command_t command)
|
||||||
/* fallback handler for commands not handled by FORTRANish parser */
|
/* fallback handler for commands not handled by FORTRANish parser */
|
||||||
{
|
{
|
||||||
long sv;
|
long sv;
|
||||||
char buf[LINESIZE];
|
char buf[2 * LINESIZE + 1];
|
||||||
sprintf(buf, "%s %s", command.raw1, command.raw2);
|
sprintf(buf, "%s %s", command.raw1, command.raw2);
|
||||||
|
|
||||||
if (sscanf(buf, "seed %ld", &sv) == 1) {
|
if (sscanf(buf, "seed %ld", &sv) == 1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue