Handle a bare numeric token on the command line a bit more gracefully.
This commit is contained in:
parent
ac2dad44bc
commit
d5d6a3e02d
3 changed files with 8 additions and 0 deletions
1
NEWS
1
NEWS
|
@ -2,6 +2,7 @@
|
|||
|
||||
Repository head::
|
||||
Fix for a minor bug in inventory handling.
|
||||
Handle a bare numeric token on the command line a bit more gracefully.
|
||||
|
||||
1.4: 2017-08-07::
|
||||
Repair packaging error (omitted templates.)
|
||||
|
|
4
main.c
4
main.c
|
@ -1179,6 +1179,10 @@ Lookup:
|
|||
command.verb = command.word[0].id;
|
||||
break;
|
||||
case NUMERIC: // LCOV_EXCL_LINE
|
||||
if (!settings.oldstyle) {
|
||||
sspeak(DONT_KNOW, command.word[0].raw);
|
||||
goto Lclearobj;
|
||||
}
|
||||
default: // LCOV_EXCL_LINE
|
||||
BUG(VOCABULARY_TYPE_N_OVER_1000_NOT_BETWEEN_0_AND_3); // LCOV_EXCL_LINE
|
||||
}
|
||||
|
|
|
@ -76,6 +76,9 @@ Unrecognized words are no longer truncated to 5 characters and
|
|||
uppercased when they are echoed. The "-o" (oldstyle) option restores
|
||||
this behavior.
|
||||
|
||||
Typing a numeric liteteral to the command prompt no longer triggers a
|
||||
fatal error. This change is reverted by the oldstyle option.
|
||||
|
||||
A "seed" command has been added. This is not intended for human use
|
||||
but as a way for game logs to set the PRNG (pseudorandom-number generator) so
|
||||
that random events (dwarf & pirate appearances, the bird's magic word)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue