From 76b7178d0d06a730a1bddf6ee00a73984c2a2261 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Tue, 22 Aug 2006 19:45:12 +0000 Subject: * gdbtypes.c (init_flags_type): Set all fields to zero instead of just the first one. --- gdb/gdbtypes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/gdbtypes.c') diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 0d297281a13..4c9f047d626 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -878,7 +878,7 @@ init_flags_type (char *name, int length) type = init_type (TYPE_CODE_FLAGS, length, TYPE_FLAG_UNSIGNED, name, NULL); TYPE_NFIELDS (type) = nfields; TYPE_FIELDS (type) = TYPE_ALLOC (type, nfields * sizeof (struct field)); - memset (TYPE_FIELDS (type), 0, sizeof (struct field)); + memset (TYPE_FIELDS (type), 0, nfields * sizeof (struct field)); return type; } -- cgit v1.2.1