From d7f6ccf58dffe1d5429d242a597fe8cfa4a36b3d Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 13 Nov 2016 15:11:51 +0200 Subject: [PATCH] Use indirect addressing, direct may not be always possible. --- debug.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/debug.cpp b/debug.cpp index a0f53b6f..f6edfae7 100644 --- a/debug.cpp +++ b/debug.cpp @@ -3743,9 +3743,14 @@ fail: static TCHAR *getfrombstr(uaecptr pp) { - uae_u8 *p = get_real_address ((uaecptr)(pp << 2)); - TCHAR *s = xcalloc (TCHAR, p[0] + 1); - return au_copy (s, p[0] + 1, (char*)p + 1); + uae_u8 len = get_byte(pp << 2); + TCHAR *s = xcalloc (TCHAR, len + 1); + char data[256]; + for (int i = 0; i < len; i++) { + data[i] = get_byte((pp << 2) + 1 + i); + data[i + 1] = 0; + } + return au_copy (s, len + 1, data); } // read one byte from expansion autoconfig ROM -- 2.47.3