* valarith.c (value_binop): Handle unsigned BINOP_REM division by zero.
This commit is contained in:
parent
41808ebe9d
commit
f8597ac33d
|
@ -1,5 +1,7 @@
|
|||
2008-02-02 Doug Evans <dje@google.com>
|
||||
|
||||
* valarith.c (value_binop): Handle unsigned BINOP_REM division by zero.
|
||||
|
||||
* typeprint.c (*): Whitespace cleanup.
|
||||
|
||||
2008-02-02 Mark Kettenis <kettenis@gnu.org>
|
||||
|
|
|
@ -1116,7 +1116,10 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
|
|||
break;
|
||||
|
||||
case BINOP_REM:
|
||||
v = v1 % v2;
|
||||
if (v2 != 0)
|
||||
v = v1 % v2;
|
||||
else
|
||||
error (_("Division by zero"));
|
||||
break;
|
||||
|
||||
case BINOP_MOD:
|
||||
|
|
Loading…
Reference in New Issue