mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
cmd: Avoid division by zero in set /a with %.
This commit is contained in:
parent
45eeeb00f3
commit
3735bf6af5
@ -3661,6 +3661,7 @@ static int WCMD_reduce(OPSTACK **opstack, VARSTACK **varstack) {
|
||||
WCMD_pushnumber(NULL, var2&var1, varstack);
|
||||
break;
|
||||
case '%': var2 = WCMD_popnumber(varstack);
|
||||
if (var1 == 0) return WCMD_DIVIDEBYZERO;
|
||||
WCMD_pushnumber(NULL, var2%var1, varstack);
|
||||
break;
|
||||
case '^': var2 = WCMD_popnumber(varstack);
|
||||
|
Loading…
Reference in New Issue
Block a user