Make RGBLINK check divisions by zero

This commit is contained in:
ISSOtm
2020-02-24 17:54:55 +01:00
parent dac13ba4bb
commit 6800609fa7

View File

@@ -163,6 +163,8 @@ static int32_t computeRPNExpr(struct Patch const *patch,
break;
case RPN_DIV:
value = popRPN();
if (value == 0)
errx(1, "%s: Division by 0", patch->fileName);
value = popRPN() / value;
break;
case RPN_MOD: