Don't zero stuff twice
This commit is contained in:
parent
51b6b52dc8
commit
ef97d579ea
2 changed files with 5 additions and 5 deletions
3
main.c
3
main.c
|
@ -1014,9 +1014,7 @@ static bool do_command()
|
||||||
listobjects();
|
listobjects();
|
||||||
|
|
||||||
L2012:
|
L2012:
|
||||||
command.verb = 0;
|
|
||||||
game.oldobj = command.obj;
|
game.oldobj = command.obj;
|
||||||
command.obj = 0;
|
|
||||||
|
|
||||||
L2600:
|
L2600:
|
||||||
checkhints();
|
checkhints();
|
||||||
|
@ -1047,6 +1045,7 @@ L2600:
|
||||||
return (false);
|
return (false);
|
||||||
if (word_count(input) > 2) {
|
if (word_count(input) > 2) {
|
||||||
rspeak(TWO_WORDS);
|
rspeak(TWO_WORDS);
|
||||||
|
free(input);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (strcmp(input, "") != 0)
|
if (strcmp(input, "") != 0)
|
||||||
|
|
7
misc.c
7
misc.c
|
@ -328,11 +328,12 @@ char* get_input()
|
||||||
|
|
||||||
if (input == NULL) // Got EOF; return with it.
|
if (input == NULL) // Got EOF; return with it.
|
||||||
return (input);
|
return (input);
|
||||||
else if (input[0] == '#') { // Ignore comments.
|
if (input[0] == '#') { // Ignore comments.
|
||||||
free(input);
|
free(input);
|
||||||
continue;
|
continue;
|
||||||
} else // We have a 'normal' line; leave the loop.
|
}
|
||||||
break;
|
// We have a 'normal' line; leave the loop.
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Strip trailing newlines from the input
|
// Strip trailing newlines from the input
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue