diff --git a/desmume/src/frontend/windows/ramwatch.cpp b/desmume/src/frontend/windows/ramwatch.cpp index 529127aaf..58745b9d4 100644 --- a/desmume/src/frontend/windows/ramwatch.cpp +++ b/desmume/src/frontend/windows/ramwatch.cpp @@ -435,8 +435,9 @@ void OpenRWRecentFile(int memwRFileNumber) do { fgets(Str_Tmp,1024,WatchFile); } while (Str_Tmp[0] == '\n'); - sscanf(Str_Tmp,"%*05X%*c%08X%*c%c%*c%c%*c%d",&(Temp.Address),&(Temp.Size),&(Temp.Type),&(Temp.WrongEndian)); - Temp.WrongEndian = 0; + int wrongEndian; + sscanf(Str_Tmp,"%*05X%*c%08X%*c%c%*c%c%*c%d",&Temp.Address,&Temp.Size,&Temp.Type,&wrongEndian); + Temp.WrongEndian = 0; //why??? char *Comment = strrchr(Str_Tmp,DELIM) + 1; *strrchr(Comment,'\n') = '\0'; InsertWatch(Temp,Comment); @@ -570,8 +571,9 @@ bool Load_Watches(bool clear, const char* filename) do { fgets(Str_Tmp,1024,WatchFile); } while (Str_Tmp[0] == '\n'); - sscanf(Str_Tmp,"%*05X%*c%08X%*c%c%*c%c%*c%d",&(Temp.Address),&(Temp.Size),&(Temp.Type),&(Temp.WrongEndian)); - Temp.WrongEndian = 0; + int wrongEndian; + sscanf(Str_Tmp,"%*05X%*c%08X%*c%c%*c%c%*c%d",&Temp.Address,&Temp.Size,&Temp.Type,&wrongEndian); + //Temp.WrongEndian = 0; //WHY? char *Comment = strrchr(Str_Tmp,DELIM) + 1; *strrchr(Comment,'\n') = '\0'; InsertWatch(Temp,Comment);