* amd64-tdep.c (amd64_dwarf_reg_to_regnum): Fix broken logic.
* s390-tdep.c (s390_dwarf_reg_to_regnum): Ditto.
+2005-03-17 Paul Brook <paul@codesourcery.com>
+
+ * amd64-tdep.c (amd64_dwarf_reg_to_regnum): Fix broken logic.
+ * s390-tdep.c (s390_dwarf_reg_to_regnum): Ditto.
+
2005-03-16 Mark Mitchell <mark@codesourcery.com>
* event-top.c (handle_sigquit): Do not define for systems without
{
int regnum = -1;
- if (reg >= 0 || reg < amd64_dwarf_regmap_len)
+ if (reg >= 0 && reg < amd64_dwarf_regmap_len)
regnum = amd64_dwarf_regmap[reg];
if (regnum == -1)
{
int regnum = -1;
- if (reg >= 0 || reg < ARRAY_SIZE (s390_dwarf_regmap))
+ if (reg >= 0 && reg < ARRAY_SIZE (s390_dwarf_regmap))
regnum = s390_dwarf_regmap[reg];
if (regnum == -1)