]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Use indirect addressing, direct may not be always possible.
authorToni Wilen <twilen@winuae.net>
Sun, 13 Nov 2016 13:11:51 +0000 (15:11 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 13 Nov 2016 13:11:51 +0000 (15:11 +0200)
debug.cpp

index a0f53b6ff8d29cd5b345f47f983c2f969f5f35a1..f6edfae7ac5bb507aded3b84e4e7a2ac09c2b4b4 100644 (file)
--- 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