X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=main.c;h=faa353b514be4001c04d0506170d0e660fbc47ef;hp=a42fe3e235682752dd6db009298dadb94635c2d2;hb=a3c159660bb03f220b7de52ba0ac4977098f389e;hpb=b27f767cc6658a4f7500054c75887d69c340c0f8 diff --git a/main.c b/main.c index a42fe3e..faa353b 100644 --- a/main.c +++ b/main.c @@ -137,6 +137,7 @@ static bool fallback_handler(struct command_t command) /* fallback handler for commands not handled by FORTRANish parser */ { long sv; + turn_t turnlimit; char buf[DIM(command.raw1) + DIM(command.raw2) + 1]; sprintf(buf, "%s %s", command.raw1, command.raw2); @@ -146,8 +147,8 @@ static bool fallback_handler(struct command_t command) // autogenerated, so don't charge user time for it. --game.turns; return true; - } else if (sscanf(buf, "waste %ld", &sv) == 1) { - game.limit -= sv; + } else if (sscanf(buf, "waste %ld", &turnlimit) == 1) { + game.limit -= turnlimit; printf("Game limit is now %ld\n", game.limit); return true; } @@ -670,7 +671,7 @@ static void playermove( int motion) /* We arrive here on conditional failure. * Skip to next non-matching destination */ - long te_tmp = travel_entry; + int te_tmp = travel_entry; do { if (travel[te_tmp].stop) BUG(CONDITIONAL_TRAVEL_ENTRY_WITH_NO_ALTERATION); // LCOV_EXCL_LINE