summaryrefslogtreecommitdiff
path: root/gdb/expprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/expprint.c')
-rw-r--r--gdb/expprint.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 1dba437e9a2..6f1fcbfe92e 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -30,6 +30,7 @@
#include "gdb_string.h"
#include "block.h"
#include "objfiles.h"
+#include "gdb_assert.h"
#ifdef HAVE_CTYPE_H
#include <ctype.h>
@@ -212,6 +213,7 @@ print_subexp_standard (struct expression *exp, int *pos,
for (tem = 0; tem < nargs; tem++)
{
nextS = strchr (s, ':');
+ gdb_assert (nextS); /* Make sure we found ':'. */
*nextS = '\0';
fprintf_unfiltered (stream, " %s: ", s);
s = nextS + 1;