diff --git a/doc/fixes36.1 b/doc/fixes36.1 index b3d6a6a9f..6b9242148 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -283,6 +283,8 @@ when poly'd into a hider and engulfed, attempt to hide via #monster was blocked various monster/object/food/gold/trap detections were inconsistent in how they behaved if performed while engulfed or underwater show in inventory which monster a leash is attached to +using /? to look up something by name, supplying multiple spaces (with no + other characters) as the name triggered impossible "singular of null?" Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository diff --git a/src/pager.c b/src/pager.c index 92c72787d..77ade35b0 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1060,9 +1060,10 @@ coord *click_cc; case '?': from_screen = FALSE; getlin("Specify what? (type the word)", out_str); - /* mungspaces prevents querying for a space glyph (eg. a ghost), - but players almost always use '/' instead to look up glyphs */ - mungspaces(out_str); + if (strcmp(out_str, " ")) /* keep single space as-is */ + /* remove leading and trailing whitespace and + condense consecutive internal whitespace */ + mungspaces(out_str); if (out_str[0] == '\0' || out_str[0] == '\033') return 0;