fix another logic error for nowin_buf read_tribute
This commit is contained in:
+1
-1
@@ -186,7 +186,7 @@ effort to scratch it behind the two ragged bits on top of its head.
|
|||||||
It was a relief to find someone else besides another ghost who could
|
It was a relief to find someone else besides another ghost who could
|
||||||
see him, and Greebo, he couldn't help feeling, was a distinctly unusual
|
see him, and Greebo, he couldn't help feeling, was a distinctly unusual
|
||||||
cat. Most of the castle cats were either pampered pets or flat-eared
|
cat. Most of the castle cats were either pampered pets or flat-eared
|
||||||
kitchen and stable habitués who generally resembled the very rodents
|
kitchen and stable habitues who generally resembled the very rodents
|
||||||
they lived on. This cat, on the other hand, was its own animal. All
|
they lived on. This cat, on the other hand, was its own animal. All
|
||||||
cats give that impression, of course, but instead of the mindless
|
cats give that impression, of course, but instead of the mindless
|
||||||
animal self-absorption that passes for secret wisdom in the creatures,
|
animal self-absorption that passes for secret wisdom in the creatures,
|
||||||
|
|||||||
+7
-3
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 files.c $NHDT-Date: 1434422673 2015/06/16 02:44:33 $ $NHDT-Branch: master $:$NHDT-Revision: 1.181 $ */
|
/* NetHack 3.6 files.c $NHDT-Date: 1434425313 2015/06/16 03:28:33 $ $NHDT-Branch: master $:$NHDT-Revision: 1.182 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -3407,6 +3407,7 @@ char *nowin_buf;
|
|||||||
boolean matchedsection = FALSE, matchedtitle = FALSE;
|
boolean matchedsection = FALSE, matchedtitle = FALSE;
|
||||||
winid tribwin = WIN_ERR;
|
winid tribwin = WIN_ERR;
|
||||||
boolean grasped = FALSE;
|
boolean grasped = FALSE;
|
||||||
|
boolean foundpassage = FALSE;
|
||||||
|
|
||||||
/* check for mandatories */
|
/* check for mandatories */
|
||||||
if (!tribsection || !tribtitle) {
|
if (!tribsection || !tribtitle) {
|
||||||
@@ -3500,11 +3501,13 @@ char *nowin_buf;
|
|||||||
if (matchedtitle && (passagenum == targetpassage)) {
|
if (matchedtitle && (passagenum == targetpassage)) {
|
||||||
if (!nowin_buf)
|
if (!nowin_buf)
|
||||||
tribwin = create_nhwindow(NHW_MENU);
|
tribwin = create_nhwindow(NHW_MENU);
|
||||||
|
else
|
||||||
|
foundpassage = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!strncmpi(&line[1], "e ", sizeof("e ") - 1)) {
|
} else if (!strncmpi(&line[1], "e ", sizeof("e ") - 1)) {
|
||||||
if (matchedtitle && (scope == PASSAGESCOPE)
|
if (matchedtitle && (scope == PASSAGESCOPE)
|
||||||
&& ((!nowin_buf && tribwin != WIN_ERR) || nowin_buf))
|
&& ((!nowin_buf && tribwin != WIN_ERR) || (nowin_buf && foundpassage)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (scope == TITLESCOPE)
|
if (scope == TITLESCOPE)
|
||||||
matchedtitle = FALSE;
|
matchedtitle = FALSE;
|
||||||
@@ -3553,7 +3556,8 @@ cleanup:
|
|||||||
if (!nowin_buf)
|
if (!nowin_buf)
|
||||||
pline("It seems to be %s of \"%s\"!", badtranslation, tribtitle);
|
pline("It seems to be %s of \"%s\"!", badtranslation, tribtitle);
|
||||||
else
|
else
|
||||||
grasped = TRUE;
|
if (foundpassage)
|
||||||
|
grasped = TRUE;
|
||||||
}
|
}
|
||||||
return grasped;
|
return grasped;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user