Replace streq() with str_start_is(), which actually has the intended semantics.

Contributed by Michael Meyer.
This commit is contained in:
nhkeni
2022-03-18 20:33:13 -04:00
parent 39acd095b2
commit b5c5496d17
5 changed files with 38 additions and 37 deletions
+2 -2
View File
@@ -364,7 +364,7 @@ title_to_mon(const char *str, int *rank_indx, int *title_length)
/* loop through each of the rank titles for role #i */
for (j = 0; j < 9; j++) {
if (roles[i].rank[j].m
&& streq(str, roles[i].rank[j].m, TRUE)) {
&& str_start_is(str, roles[i].rank[j].m, TRUE)) {
if (rank_indx)
*rank_indx = j;
if (title_length)
@@ -372,7 +372,7 @@ title_to_mon(const char *str, int *rank_indx, int *title_length)
return roles[i].mnum;
}
if (roles[i].rank[j].f
&& streq(str, roles[i].rank[j].m, TRUE)) {
&& str_start_is(str, roles[i].rank[j].f, TRUE)) {
if (rank_indx)
*rank_indx = j;
if (title_length)