]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Long size memory watch point value check fix.
authorToni Wilen <twilen@winuae.net>
Sun, 11 Jan 2015 12:30:06 +0000 (14:30 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 11 Jan 2015 12:30:06 +0000 (14:30 +0200)
debug.cpp

index 6de6ba529591cb902886c3ef97588e6173d7cbc0..14d32f050e569a485c9033eaa97e4a54890b9733 100644 (file)
--- a/debug.cpp
+++ b/debug.cpp
@@ -2120,7 +2120,7 @@ static int memwatch_func (uaecptr addr, int rwi, int size, uae_u32 *valp, uae_u3
 
                if (!m->frozen && m->val_enabled) {
                        int trigger = 0;
-                       uae_u32 mask = (1 << (m->size * 8)) - 1;
+                       uae_u32 mask = m->size == 4 ? 0xffffffff : (1 << (m->size * 8)) - 1;
                        uae_u32 mval = m->val;
                        int scnt = size;
                        for (;;) {
@@ -2136,6 +2136,8 @@ static int memwatch_func (uaecptr addr, int rwi, int size, uae_u32 *valp, uae_u3
                                        mask <<= 16;
                                        scnt -= 2;
                                        mval <<= 16;
+                               } else {
+                                       scnt -= 4;
                                }
                                if (scnt <= 0)
                                        break;