diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-28 14:36:55 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-28 14:36:55 +0000 |
commit | b36751b7970a699f453da471261d258868741281 (patch) | |
tree | 3a40aa654aeedc66df3a4b16baca9301769b75e9 /src/map | |
parent | 48ec7a6f080c568c771c27c1ee92008174f10388 (diff) | |
download | hercules-b36751b7970a699f453da471261d258868741281.tar.gz hercules-b36751b7970a699f453da471261d258868741281.tar.bz2 hercules-b36751b7970a699f453da471261d258868741281.tar.xz hercules-b36751b7970a699f453da471261d258868741281.zip |
- Added function stristr to strlib.c, used by mob.c and item_db.c for case-insensitive seeks.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6345 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/itemdb.c | 5 | ||||
-rw-r--r-- | src/map/mob.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 796712af3..4f6079f3a 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -9,6 +9,7 @@ #include "../common/malloc.h"
#include "../common/showmsg.h"
#include "../common/grfio.h"
+#include "../common/strlib.h"
#include "map.h"
#include "battle.h"
#include "itemdb.h"
@@ -75,9 +76,9 @@ static int itemdb_searchname_array_sub(DBKey key,void * data,va_list ap) str=va_arg(ap,char *);
if (item == dummy_item)
return 1; //Invalid item.
- if(strstr(item->jname,str))
+ if(stristr(item->jname,str))
return 0;
- if(strstr(item->name,str))
+ if(stristr(item->name,str))
return 0;
return strcmpi(item->jname,str);
}
diff --git a/src/map/mob.c b/src/map/mob.c index 6e2bc399f..15386ded0 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -14,6 +14,7 @@ #include "../common/malloc.h"
#include "../common/showmsg.h"
#include "../common/ers.h"
+#include "../common/strlib.h"
#include "map.h"
#include "clif.h"
@@ -84,9 +85,9 @@ static int mobdb_searchname_array_sub(struct mob_db* mob, const char *str) {
if (mob == mob_dummy)
return 1; //Invalid item.
- if(strstr(mob->jname,str))
+ if(stristr(mob->jname,str))
return 0;
- if(strstr(mob->name,str))
+ if(stristr(mob->name,str))
return 0;
return strcmpi(mob->jname,str);
}
|