From cbfd453bcd952b7d7d570929139f0e17553c5448 Mon Sep 17 00:00:00 2001 From: ugetab Date: Wed, 5 May 2010 05:02:23 +0000 Subject: [PATCH] Added a sanity check to the GotoAddress code, because some users have none. --- src/drivers/win/memview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/drivers/win/memview.cpp b/src/drivers/win/memview.cpp index 84c0d26a..094dda8b 100644 --- a/src/drivers/win/memview.cpp +++ b/src/drivers/win/memview.cpp @@ -237,6 +237,8 @@ void GotoAddress(HWND hwnd) { { if(EOF != sscanf(gotoaddressstring, "%x", &gotoaddress)) { + if (gotoaddress < 0) + gotoaddress = 0; if (gotoaddress > (MaxSize-1)) gotoaddress = (MaxSize-1); CursorStartAddy = gotoaddress;