X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=inline;f=main.c;h=ea03b8edd5c373de0dec5e746c26b430cdcf69bc;hb=ad75cc1eb7638f6fe7bdb7ea0cf12376b3a7d9b3;hp=61a82e2f49e13e2140b97e167e70b6aeac31475b;hpb=c5250b5f3f7e91c9af36877f2eeeb769bf3157b2;p=open-adventure.git diff --git a/main.c b/main.c index 61a82e2..ea03b8e 100644 --- a/main.c +++ b/main.c @@ -160,14 +160,14 @@ char *myreadline(const char *prompt) if (settings.scriptfp != NULL && feof(settings.scriptfp)) fclose(settings.scriptfp); if (strcmp(next, "-") == 0) - settings.scriptfp = stdin; + settings.scriptfp = stdin; // LCOV_EXCL_LINE else settings.scriptfp = fopen(next, "r"); } if (isatty(fileno(settings.scriptfp))) { - free(buf); - return readline(prompt); + free(buf); // LCOV_EXCL_LINE + return readline(prompt); // LCOV_EXCL_LINE } else { char *ln = fgets(buf, BUFSIZ-1, settings.scriptfp); if (ln != NULL) { @@ -255,6 +255,7 @@ static void checkhints(void) game.hintlc[hint] = 0; return; default: // LCOV_EXCL_LINE + // Should never hap[pen BUG(HINT_NUMBER_EXCEEDS_GOTO_LIST); // LCOV_EXCL_LINE } @@ -1087,7 +1088,7 @@ static bool preprocess_command(command_t *command) if (game.loc == LOC_COBBLE || game.loc == LOC_DEBRIS || game.loc == LOC_AWKWARD || - game.loc == LOC_BIRD || + game.loc == LOC_BIRDCHAMBER || game.loc == LOC_PITTOP) { command->word[0].id = ENTRANCE; }