tty's compress_str(), core's dat/keyhelp
Rewrite 3.6.1's compress_str() to avoid peeking past the end of the input string. This should eliminate the reported valgrind complaint. The problem was noticed for post-3.6.0 code introduced [by me...] last June, but it looks like it was present in the old code too. Also, fix the wording in the paragraph about NUL in the keyhelp text. tty_putstr() always passes non-message window text through compress_str(), clobbering usage of two spaces to separate sentences. putstr()'s caller ought to have more control over that (possibly via its hardly ever used 'attribute' arg?).
This commit is contained in:
12
dat/keyhelp
12
dat/keyhelp
@@ -14,12 +14,12 @@
|
||||
is reporting the wrong character but will be operating correctly if
|
||||
it describes ^J when you type ^M.
|
||||
|
||||
A NUL character, typed as ^<space> on some keyboards, ^@ on others,
|
||||
and maybe not typeable at all on yet others. It is not used as a
|
||||
command, and will be converted into ESC before reaching 'whatdoes'.
|
||||
Unlike ^M, this transformation is performed by NetHack itself.
|
||||
But like ^M, if you type NUL and get feedback about ESC, the
|
||||
situation is expected.
|
||||
A NUL character, which is typed as ^<space> on some keyboards,
|
||||
^@ on others, and maybe not typeable at all on yet others, is not
|
||||
used as a command, and will be converted into ESC before reaching
|
||||
'whatdoes'. Unlike ^M, this transformation is performed within
|
||||
NetHack. But like ^M, if you type NUL and get feedback about ESC,
|
||||
the situation is expected.
|
||||
|
||||
ESC itself is a synonym for ^[, and is another source of oddity.
|
||||
Various function keys, including cursor arrow keys, may transmit
|
||||
|
||||
Reference in New Issue
Block a user