From: Eric S. Raymond Date: Sun, 11 Nov 2018 14:05:03 +0000 (-0500) Subject: Handle a bare numeric token on the command line a bit more gracefully. X-Git-Tag: 1.5~1 X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=commitdiff_plain;h=d5d6a3e02d344ed4097a38f54ccf6757e627a1f6 Handle a bare numeric token on the command line a bit more gracefully. --- diff --git a/NEWS b/NEWS index 18df431..c186b2e 100644 --- a/NEWS +++ b/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.) diff --git a/main.c b/main.c index c1ebe0e..198a4cc 100644 --- a/main.c +++ b/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 } diff --git a/notes.adoc b/notes.adoc index 4119d61..c1b5c84 100644 --- a/notes.adoc +++ b/notes.adoc @@ -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)