Added a sanity check to the GotoAddress code, because some users have none.

This commit is contained in:
ugetab 2010-05-05 05:02:23 +00:00
parent b7fc64fe7e
commit cbfd453bcd
1 changed files with 2 additions and 0 deletions

View File

@ -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;