X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=misc.c;h=5eb1fa2f3d074ad3734e205723b836cb8ef8c789;hp=c907d123df56c0fdfae53662c8e09c1962260229;hb=0d0b8df0a3f6dc7b765c35fa7cc2d2fe52406d87;hpb=3c8482a6136167677bd46d647e90d649035ebe97 diff --git a/misc.c b/misc.c index c907d12..5eb1fa2 100644 --- a/misc.c +++ b/misc.c @@ -459,7 +459,7 @@ int get_motion_vocab_id(const char* word) { for (int i = 0; i < NMOTIONS; ++i) { for (int j = 0; j < motions[i].words.n; ++j) { - if (strcasecmp(word, motions[i].words.strs[j]) == 0) + if (strcasecmp(word, motions[i].words.strs[j]) == 0 && (strlen(word) > 1 || strchr(ignore, word[0]) == NULL || !oldstyle)) return (i); } } @@ -485,7 +485,7 @@ int get_action_vocab_id(const char* word) { for (int i = 0; i < NACTIONS; ++i) { for (int j = 0; j < actions[i].words.n; ++j) { - if (strcasecmp(word, actions[i].words.strs[j]) == 0) + if (strcasecmp(word, actions[i].words.strs[j]) == 0 && (strlen(word) > 1 || strchr(ignore, word[0]) == NULL || !oldstyle)) return (i); } }