X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=actions.c;h=6000f41e01980eb91a9ecf82296e5358a515809d;hp=0aa7d9302decd3ed14d01719a5e8441d299b883d;hb=3bfaff447bff1f1b2fed45b424ca596140be103d;hpb=51b6b52dc88beeb7873939cadfd61770e69259c3 diff --git a/actions.c b/actions.c index 0aa7d93..6000f41 100644 --- a/actions.c +++ b/actions.c @@ -419,7 +419,10 @@ static int chain(verb_t verb) switch (game.prop[BEAR]) { case BEAR_DEAD: - game.fixed[BEAR] = IS_FIXED; + /* Can't be reached as long as the only way for the bear to die + * is from a bridge collapse. Leave in in case this changes, but + * exclude from coverage testing. */ + game.fixed[BEAR] = IS_FIXED; // LCOV_EXCL_LINE break; default: game.fixed[BEAR] = IS_FREE; @@ -1114,7 +1117,7 @@ static int say(struct command_t *command) { if (command->wd2 > 0) { command->wd1 = command->wd2; - strcpy(command->raw1, command->raw2); + strncpy(command->raw1, command->raw2, LINESIZE - 1); } char word1[TOKLEN + 1]; packed_to_token(command->wd1, word1);