From d72f98cb3c85ac8271ea616ea2285b57a5e8b671 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Thu, 7 May 2009 13:59:46 +0000 Subject: Fix MCS51 disassembler to work properly when there are two memory arguments (the second would overwrite the first). --- src/emu/cpu/mcs51/mcs51dasm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/emu/cpu/mcs51/mcs51dasm.c b/src/emu/cpu/mcs51/mcs51dasm.c index 814e5613509..a8889d0219a 100644 --- a/src/emu/cpu/mcs51/mcs51dasm.c +++ b/src/emu/cpu/mcs51/mcs51dasm.c @@ -282,7 +282,9 @@ static void init_mem_names(int feature_set, const char **mem_names) static const char *get_data_address( const char **mem_names, UINT8 arg ) { - static char buffer[32]; + static char buffer_array[4][32]; + static int whichbuf; + char *buffer = &buffer_array[++whichbuf % 4][0]; if (mem_names[arg] == NULL) sprintf(buffer,"$%02X",arg); -- cgit v1.2.3