diff options
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; |