version 1.22 | | version 1.23 |
---|
| | |
/* | | /* |
* static char *rcsid_skill_util_c = | | * static char *rcsid_skill_util_c = |
* "$Id: skill_util.c,v 1.22 2001/11/27 04:33:46 michtoen Exp $"; | | * "$Id: skill_util.c,v 1.23 2002/01/25 10:53:37 gros Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
nmlen=strlen(name); | | nmlen=strlen(name); |
| | |
for (skillnr=0; skillnr<NROFSKILLS; skillnr++) { | | for (skillnr=0; skillnr<NROFSKILLS; skillnr++) { |
| | if (strlen(name)>=strlen(skills[skillnr].name)) /* GROS - This is to prevent strings like "hi" to be matched as "hiding" */ |
if (!strncmp(name,skills[skillnr].name,MIN(strlen(skills[skillnr].name), | | if (!strncmp(name,skills[skillnr].name,MIN(strlen(skills[skillnr].name), |
nmlen))) return skillnr; | | nmlen))) return skillnr; |
} | | } |