diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-09 20:27:01 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-09 20:27:01 +0000 |
commit | 9900f204c1adfaada2755c5db4209c9a20c08fdb (patch) | |
tree | 719d5266a3ae14f2194e520e88d43355fc60c85a /src/map/script.c | |
parent | e0a18f0853dd7a0cf0533ae0d10da9d19b116767 (diff) | |
download | hercules-9900f204c1adfaada2755c5db4209c9a20c08fdb.tar.gz hercules-9900f204c1adfaada2755c5db4209c9a20c08fdb.tar.bz2 hercules-9900f204c1adfaada2755c5db4209c9a20c08fdb.tar.xz hercules-9900f204c1adfaada2755c5db4209c9a20c08fdb.zip |
- Fixed crash if a script does a%0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10200 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c index f0d491176..bff02bce3 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2506,7 +2506,7 @@ void op_2num(struct script_state *st,int op,int i1,int i2) int ret = 0; double ret_double = 0; switch(op){ - case C_MOD: ret = i1 % i2; break; + case C_MOD: ret = i2 ? i1 % i2 : 0; break; case C_AND: ret = i1 & i2; break; case C_OR: ret = i1 | i2; break; case C_XOR: ret = i1 ^ i2; break; |