another scrambled message when given '-' as object

This is similar to commit 98d381de46
(which mis-classified the bug as post-3.6), using #rub on a lump
of royal jelly and supplying '-' rather than an egg as the target
yielded "You mime rub the royal jellying on something."  Change
it to be "You mime rubbing the royal jelly on something."
This commit is contained in:
PatR
2021-04-18 17:34:26 -07:00
parent 221d82f899
commit 2d2c584c96
2 changed files with 7 additions and 3 deletions

View File

@@ -1427,10 +1427,12 @@ mime_action(const char *word)
*bp = '\0';
sfx = (bp + 1); /* "something <sfx>" */
}
if (!strncmp(buf, "dip ", 4) && strstr(buf + 4, " into")) {
/* "dip <foo> into" => "dipping <foo> into" */
if ((!strncmp(buf, "rub the ", 8) && strstr(buf + 8, " on"))
|| (!strncmp(buf, "dip ", 4) && strstr(buf + 4, " into"))) {
/* "rub the royal jelly on" -> "rubbing the royal jelly on", or
"dip <foo> into" => "dipping <foo> into" */
buf[3] = '\0';
pfx = &buf[4]; /* "<pfx> something" */
pfx = &buf[3 + 1]; /* "<pfx> something" */
}
if ((bp = strstr(buf, " or ")) != 0) {
*bp = '\0';