aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorgdb-2.5.3 <gdb@fsf.org>1988-06-13 01:00:00 +0100
committerPedro Alves <palves@redhat.com>2012-06-03 15:36:30 +0100
commit7c75bab3d3ef344a6a0b13b9ab59ecd5855aceb5 (patch)
tree4e50a84965c0e24ba6734d9717e007e68879c8e0 /gdb/valops.c
parent6368691e88d78f0bb6a46b74d7ed86118ac84e8b (diff)
downloadgdb-7c75bab3d3ef344a6a0b13b9ab59ecd5855aceb5.zip
gdb-7c75bab3d3ef344a6a0b13b9ab59ecd5855aceb5.tar.gz
gdb-7c75bab3d3ef344a6a0b13b9ab59ecd5855aceb5.tar.bz2
gdb-2.5.3
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 8992c0f..76466b6 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -957,8 +957,8 @@ int typecmp(t1, t2)
int i;
if (t1[0]->code == TYPE_CODE_VOID) return 0;
- if (!t1[1])return 0;
- for (i = 1; t1[i]->code != TYPE_CODE_VOID; i++)
+ if (!t1[1]) return 0;
+ for (i = 1; t1[i] && t1[i]->code != TYPE_CODE_VOID; i++)
{
if (! t2[i]
|| t1[i]->code != t2[i]->type->code
@@ -967,6 +967,7 @@ int typecmp(t1, t2)
return i+1;
}
}
+ if (!t1[i]) return 0;
return t2[i] ? i+1 : 0;
}