R804 - fix crash caused by looking at a unique boulder symbol

The code only handled the case where the boulder symbol was non-unique.
Add code to handle the case where the boulder sym is the first match.
This commit is contained in:
cohrs
2002-04-19 02:28:20 +00:00
parent 20472e645c
commit 91b2bab5d5
2 changed files with 9 additions and 1 deletions

View File

@@ -656,8 +656,15 @@ do_look(quick)
}
/* handle optional boulder symbol as a special case */
if (iflags.bouldersym && sym == iflags.bouldersym)
if (iflags.bouldersym && sym == iflags.bouldersym) {
if (!found) {
firstmatch = "boulder";
Sprintf(out_str, "%c %s", sym, an(firstmatch));
found++;
} else {
found += append_str(out_str, "boulder");
}
}
/*
* If we are looking at the screen, follow multiple possibilities or