summaryrefslogtreecommitdiff
path: root/emulators/vba/patches/patch-af
blob: a393cb13744d23c55e7f5ca23e1b7b074b8b4f99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$NetBSD: patch-af,v 1.2 2012/03/29 20:32:34 wiz Exp $

--- src/sdl/debugger.cpp.orig	2004-05-13 14:13:14.000000000 +0000
+++ src/sdl/debugger.cpp
@@ -950,9 +950,9 @@ void debuggerBreakOnWrite(u32 *mem, u32 
 {
   u32 address = 0;
   if(mem >= (u32*)&workRAM[0] && mem <= (u32*)&workRAM[0x3ffff])
-    address = 0x2000000 + ((u32)mem - (u32)&workRAM[0]);
+    address = 0x2000000 + (u32)((u8 *)mem - &workRAM[0]);
   else
-    address = 0x3000000 + ((u32)mem - (u32)&internalRAM[0]);
+    address = 0x3000000 + (u32)((u8 *)mem - &internalRAM[0]);
 
   if(size == 2)
     printf("Breakpoint (on write) address %08x old:%08x new:%08x\n", 
@@ -1280,7 +1280,7 @@ void debuggerMemoryByte(int n, char **ar
   if(n == 2) {
     u32 addr = 0;
     sscanf(args[1], "%x", &addr);
-    for(int i = 0; i < 16; i++) {
+    for(int s = 0; s < 16; s++) {
       int a = debuggerReadByte(addr);
       int b = debuggerReadByte(addr+1);
       int c = debuggerReadByte(addr+2);
@@ -1316,7 +1316,7 @@ void debuggerMemoryHalfWord(int n, char 
     u32 addr = 0;
     sscanf(args[1], "%x", &addr);
     addr = addr & 0xfffffffe;
-    for(int i = 0; i < 16; i++) {
+    for(int s = 0; s < 16; s++) {
       int a = debuggerReadByte(addr);
       int b = debuggerReadByte(addr+1);
       int c = debuggerReadByte(addr+2);
@@ -1352,7 +1352,7 @@ void debuggerMemory(int n, char **args)
     u32 addr = 0;
     sscanf(args[1], "%x", &addr);
     addr = addr & 0xfffffffc;
-    for(int i = 0; i < 16; i++) {
+    for(int s = 0; s < 16; s++) {
       int a = debuggerReadByte(addr);
       int b = debuggerReadByte(addr+1);
       int c = debuggerReadByte(addr+2);