From: NHOrus Date: Sun, 16 Jul 2017 13:07:23 +0000 (+0300) Subject: Removed temporary variable for clarity; Upsized text buffer in fallback to maximum... X-Git-Tag: 1.3~75 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=614d9b34ade2bc707ae00415dc260d8c38c7a321;p=open-adventure.git Removed temporary variable for clarity; Upsized text buffer in fallback to maximum possible size --- diff --git a/actions.c b/actions.c index efa52a6..54cd4e0 100644 --- a/actions.c +++ b/actions.c @@ -201,15 +201,14 @@ static int bigwords(long id) * crossing. */ if (game.place[EGGS] == LOC_NOWHERE && game.place[TROLL] == LOC_NOWHERE && game.prop[TROLL] == TROLL_UNPAID) game.prop[TROLL] = TROLL_PAIDONCE; - int k; if (HERE(EGGS)) - k = EGGS_VANISHED; + pspeak(EGGS, look, EGGS_VANISHED, true); else if (game.loc == objects[EGGS].plac) - k = EGGS_HERE; + pspeak(EGGS, look, EGGS_HERE, true); else - k = EGGS_DONE; + pspeak(EGGS, look, EGGS_DONE, true); move(EGGS, objects[EGGS].plac); - pspeak(EGGS, look, k, true); + return GO_CLEAROBJ; } } else { diff --git a/main.c b/main.c index f8bf8a1..bf89278 100644 --- a/main.c +++ b/main.c @@ -137,7 +137,7 @@ static bool fallback_handler(struct command_t command) /* fallback handler for commands not handled by FORTRANish parser */ { long sv; - char buf[LINESIZE]; + char buf[2 * LINESIZE + 1]; sprintf(buf, "%s %s", command.raw1, command.raw2); if (sscanf(buf, "seed %ld", &sv) == 1) {