diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-11-28 20:24:43 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-11-28 20:24:43 +0000 |
commit | a4d892347480b08b925ff3506ea0d0683763163c (patch) | |
tree | f4a30b3a3eaefd5a01259eafc84f153b75fc5504 /src/map/script.c | |
parent | 7d25914ea2a9a36591dcfc950cf4384d07c4cef4 (diff) | |
download | hercules-a4d892347480b08b925ff3506ea0d0683763163c.tar.gz hercules-a4d892347480b08b925ff3506ea0d0683763163c.tar.bz2 hercules-a4d892347480b08b925ff3506ea0d0683763163c.tar.xz hercules-a4d892347480b08b925ff3506ea0d0683763163c.zip |
* Fixed removing item scripts through script command *setitemscript not working the way it is stated in script_commands.txt (related r9831).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14999 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c index 92ae852e9..151535c2f 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -13082,7 +13082,7 @@ BUILDIN_FUNC(setitemscript) n=script_getnum(st,4); i_data = itemdb_exists(item_id); - if (!i_data || script==NULL || script[0]!='{') { + if (!i_data || script==NULL || ( script[0] && script[0]!='{' )) { script_pushint(st,0); return 0; } @@ -13100,7 +13100,7 @@ BUILDIN_FUNC(setitemscript) if(*dstscript) script_free_code(*dstscript); - *dstscript = parse_script(script, "script_setitemscript", 0, 0); + *dstscript = script[0] ? parse_script(script, "script_setitemscript", 0, 0) : NULL; script_pushint(st,1); return 0; } |