forked from Imagelibrary/binutils-gdb
* valarith.c (value_binop): Handle unsigned integer
division by zero.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2008-01-29 Pierre Muller <muller@ics.u-strasbg.fr>
|
||||||
|
|
||||||
|
* valarith.c (value_binop): Handle unsigned integer
|
||||||
|
division by zero.
|
||||||
|
|
||||||
2008-01-28 Kevin Buettner <kevinb@redhat.com>
|
2008-01-28 Kevin Buettner <kevinb@redhat.com>
|
||||||
|
|
||||||
* mn10300-tdep.c (mn10300_analyze_prologue): Check for an
|
* mn10300-tdep.c (mn10300_analyze_prologue): Check for an
|
||||||
|
|||||||
@@ -1035,7 +1035,10 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
|
|||||||
|
|
||||||
case BINOP_DIV:
|
case BINOP_DIV:
|
||||||
case BINOP_INTDIV:
|
case BINOP_INTDIV:
|
||||||
v = v1 / v2;
|
if (v2 != 0)
|
||||||
|
v = v1 / v2;
|
||||||
|
else
|
||||||
|
error (_("Division by zero"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BINOP_EXP:
|
case BINOP_EXP:
|
||||||
|
|||||||
Reference in New Issue
Block a user