From 21b4ac17687ab852b5159de7bd120aa2b7713567 Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Mon, 7 Apr 1997 19:45:47 +0000 Subject: [PATCH] * cgen-dis.c (build_dis_hash_table): Fix xmalloc size computation. --- opcodes/ChangeLog | 2 ++ opcodes/cgen-dis.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 44d4820380..cd108fc621 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,5 +1,7 @@ Mon Apr 7 11:45:44 1997 Doug Evans + * cgen-dis.c (build_dis_hash_table): Fix xmalloc size computation. + * cgen-opc.c (hash_keyword_name): Improve algorithm. * disassemble.c (disassembler): Handle m32r. diff --git a/opcodes/cgen-dis.c b/opcodes/cgen-dis.c index 384fe5c311..9ed8a0a997 100644 --- a/opcodes/cgen-dis.c +++ b/opcodes/cgen-dis.c @@ -70,7 +70,7 @@ build_dis_hash_table () dis_hash_table = (CGEN_INSN_LIST **) xmalloc (hash_size * sizeof (CGEN_INSN_LIST *) - + count * sizeof (CGEN_INSN_LIST *)); + + count * sizeof (CGEN_INSN_LIST)); memset (dis_hash_table, 0, hash_size * sizeof (CGEN_INSN_LIST *) + count * sizeof (CGEN_INSN_LIST)); -- 2.34.1