-$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.124 $ $NHDT-Date: 1570232224 2019/10/04 23:37:04 $
+$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.125 $ $NHDT-Date: 1570318925 2019/10/05 23:42:05 $
This fixes36.3 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.2 in May 2019. Please note, however,
disrobing/dropping in order to crawl out chooses to drop those boots
'sortloot's attempt to group musical instruments separately from other tools
didn't work as intended due to missing 'break' in sortloot_classify()
+<shift><letter> running told player about engravings as they were being moved
+ over but buffered output didn't show it until hero stopped, so it
+ wasn't possible to tell where they were, unlike all other forms of
+ multiple movement; stop running if/when an engraving is reached
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
-/* NetHack 3.6 engrave.c $NHDT-Date: 1456304550 2016/02/24 09:02:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.61 $ */
+/* NetHack 3.6 engrave.c $NHDT-Date: 1570318925 2019/10/05 23:42:05 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.75 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
{
register struct engr *ep = engr_at(x, y);
int sensed = 0;
- char buf[BUFSZ];
/* Sensing an engraving does not require sight,
* nor does it necessarily imply comprehension (literacy).
impossible("%s is written in a very strange way.", Something);
sensed = 1;
}
+
if (sensed) {
- char *et;
- unsigned maxelen = BUFSZ - sizeof("You feel the words: \"\". ");
- if (strlen(ep->engr_txt) > maxelen) {
- (void) strncpy(buf, ep->engr_txt, (int) maxelen);
+ char *et, buf[BUFSZ];
+ int maxelen = (int) (sizeof buf
+ /* sizeof "literal" counts terminating \0 */
+ - sizeof "You feel the words: \"\".");
+
+ if ((int) strlen(ep->engr_txt) > maxelen) {
+ (void) strncpy(buf, ep->engr_txt, maxelen);
buf[maxelen] = '\0';
et = buf;
- } else
+ } else {
et = ep->engr_txt;
+ }
You("%s: \"%s\".", (Blind) ? "feel the words" : "read", et);
- if (context.run > 1)
+ if (context.run > 0)
nomul(0);
}
}