From 059afc0d8e9d414d51c5a8918e9cc66ba095f665 Mon Sep 17 00:00:00 2001 From: stephena Date: Wed, 29 Mar 2006 13:53:00 +0000 Subject: [PATCH] Fixed long standing bug with comparitive searches of RAM in the debugger. Since it didn't really work, it makes me wonder exactly how many people are using these features (since they certainly aren't reporting the bugs). git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1072 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/debugger/gui/RamWidget.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/stella/src/debugger/gui/RamWidget.cxx b/stella/src/debugger/gui/RamWidget.cxx index 534ce2c71..35fc7fb5a 100644 --- a/stella/src/debugger/gui/RamWidget.cxx +++ b/stella/src/debugger/gui/RamWidget.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: RamWidget.cxx,v 1.4 2006-03-23 16:16:32 stephena Exp $ +// $Id: RamWidget.cxx,v 1.5 2006-03-29 13:53:00 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -368,7 +368,7 @@ const string RamWidget::doCompare(const string& str) // Now, search all memory locations specified in mySearchArray for this value RamDebug& dbg = instance()->debugger().ramDebug(); - IntArray tempList; + IntArray tempAddrList, tempValueList; for(unsigned int i = 0; i < mySearchAddr.size(); ++i) { if(comparitiveSearch) @@ -380,11 +380,15 @@ const string RamWidget::doCompare(const string& str) int addr = mySearchAddr[i]; if(dbg.read(addr) == searchVal) - tempList.push_back(addr); + { + tempAddrList.push_back(addr); + tempValueList.push_back(searchVal); + } } - // Update the searchArray to the new results - mySearchAddr = tempList; + // Update the searchArray for the new addresses and data + mySearchAddr = tempAddrList; + mySearchValue = tempValueList; // If we have some hits, enable the comparison methods if(mySearchAddr.size() > 0)