Win32 - Memwatch - ignore spaces at the beginnign of an address in the address boxes

This commit is contained in:
adelikat 2010-05-25 04:34:34 +00:00
parent 43938a1999
commit 23277bc4df
3 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,4 @@
24-may-2010 - adelikat - Win32 - Memwatch - ignore spaces at the beginnign of an address in the address boxes
24-may-2010 - mart0258 - Disable auto-savestates during turbo
24-may-2010 - mart0258 - Prevent .zip files containing no recognized files from causing crash
23-may-2010 - adelikat - Win32 - Replay dialog - fix bug that was causing it to always report savestate movies as soft-reset

View File

@ -234,28 +234,35 @@ static struct MWRec
GetDlgItemText(hwndMemWatch,ctl,TempArray,16);
TempArray[15]=0;
int x = 0;
for (x = 0; x < 15; x++)
{
if (!(TempArray[x] == ' '))
break;
} //The point of this loop is to ignore spaces at the begginning of a address box
valid = hex = twobytes = false;
switch(TempArray[0])
switch(TempArray[x])
{
case 0:
break;
case '!':
twobytes=true;
addr=FastStrToU16(TempArray+1,valid);
addr=FastStrToU16(TempArray+x+1,valid);
break;
case 'x':
hex = true;
valid = true;
addr=FastStrToU16(TempArray+1,valid);
addr=FastStrToU16(TempArray+x+1,valid);
break;
case 'X':
hex = twobytes = true;
valid = true;
addr = FastStrToU16(TempArray+1,valid);
addr = FastStrToU16(TempArray+x+1,valid);
break;
default:
valid = true;
addr=FastStrToU16(TempArray,valid);
addr=FastStrToU16(TempArray+x,valid);
break;
}
}

View File

@ -1489,7 +1489,7 @@ void FCEUI_MoviePlayFromBeginning(void)
if (currMovieData.savestate.empty())
{
movie_readonly=true;
poweron(true); //Bad, this assumes a movie doesn't start from savestate
poweron(true);
currFrameCounter=0;
movieMode = MOVIEMODE_PLAY;
FCEU_DispMessage("Movie is now Read-Only. Playing from beginning.",0);