Re:How to program a text adventure in C (2016)
by pm215 on Sunday March 22, 2020 @10:57AM
(#22655326)
I think the last array entry {executeNoMatch , "A?"} will match on any string (and print the fallback "I don't know how to VERB" message), so it's impossible to fall off the end of the array. If you wanted to use a more defensive-programming style then you could add a sentinel of some kind and assert that you never hit it.
[ Parent
| on HN ]
There are no comments on this comment yet.