mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-29 12:53:43 +08:00
* valarith.c (value_binop): Handle unsigned BINOP_REM division by zero.
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user