]>
git.pond.sub.org Git - empserver/commit
edit: Report unit key 'U' failure more nicely, and avoid oops
Two failure modes:
* When the argument is negative, edit() attempts an invalid write,
triggering an oops. edit() detects the write failure, and returns
RET_FAIL.
Detect the negative argument instead, and return RET_SYN, like we do
for other invalid edit arguments.
* When the argument requires the table to be extended, but the
extension fails, edit() returns RET_FAIL.
Additionally report the failure to the player.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>