diff options
author | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-03-05 16:59:20 +0000 |
---|---|---|
committer | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-03-05 16:59:20 +0000 |
commit | 6065a6c341f757f3e0eb35df27168d29fabab318 (patch) | |
tree | a1d5508e9edfd80b8bb146acc801844563a97fa4 /src/map/npc.c | |
parent | dd6d232f62f0c3611902eadc4ebdc5f2a6c2ec23 (diff) | |
download | hercules-6065a6c341f757f3e0eb35df27168d29fabab318.tar.gz hercules-6065a6c341f757f3e0eb35df27168d29fabab318.tar.bz2 hercules-6065a6c341f757f3e0eb35df27168d29fabab318.tar.xz hercules-6065a6c341f757f3e0eb35df27168d29fabab318.zip |
Fixed an infinite loop if script name contains a single ':'
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9962 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index f6fa6e9ac..695037b8d 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2077,8 +2077,10 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line nd->u.scr.ys = 0; } - while ((p = strchr(w3,':'))) { + p = strchr(w3,':'); + while (p) { if (p[1] == ':') break; + p = strchr(p+1, ':'); } if (p) { *p = 0; |