diff --git a/trunk/src/boards/232.cpp b/trunk/src/boards/232.cpp index 5f1df089..86bb0d04 100644 --- a/trunk/src/boards/232.cpp +++ b/trunk/src/boards/232.cpp @@ -30,7 +30,7 @@ static SFORMAT StateRegs[] = static void Sync(void) { // uint32 bbank = (bank & 0x18) >> 1; - uint32 bbank = ((bank & 0x10) >> 2) | (bank & 8); // some dumps have bbanks swapped, if swap commands, + uint32 bbank = ((bank & 0x10) >> 2) | (bank & 8); // some dumps have bbanks swapped, if swap commands, // then all roms can be played, but with some swapped // games in menu. if not, some dumps are unplayable // make hard dump for both cart types to check diff --git a/trunk/src/boards/28.cpp b/trunk/src/boards/28.cpp index 67053302..7f8bae30 100644 --- a/trunk/src/boards/28.cpp +++ b/trunk/src/boards/28.cpp @@ -129,7 +129,7 @@ static DECLFW(WriteEXP) { uint32 addr = A; uint8 value = V; - if (addr >= 05000) + if (addr >= 0x5000) reg = value & 0x81; } diff --git a/trunk/src/boards/emu2413.c b/trunk/src/boards/emu2413.c index c7e6b164..240aeb00 100644 --- a/trunk/src/boards/emu2413.c +++ b/trunk/src/boards/emu2413.c @@ -335,7 +335,7 @@ static void makeDphaseARTable(void) { dphaseARTable[AR][Rks] = 0; /*EG_DP_WIDTH;*/ break; default: - dphaseARTable[AR][Rks] = rate_adjust((3 * (RL + 4) << (RM + 1))); + dphaseARTable[AR][Rks] = rate_adjust(3 * (RL + 4) << (RM + 1)); break; } } diff --git a/trunk/src/drivers/win/memview.cpp b/trunk/src/drivers/win/memview.cpp index b2870d5d..711ff78e 100644 --- a/trunk/src/drivers/win/memview.cpp +++ b/trunk/src/drivers/win/memview.cpp @@ -190,7 +190,7 @@ int FindAsText; int FindDirectionUp; char FindTextBox[60]; -uint32 temp_offset; +int temp_offset; extern iNES_HEADER head; @@ -918,7 +918,7 @@ void InputData(char *input){ char inputc; //char str[100]; //mbg merge 7/18/06 added cast: - data = (uint8*)malloc(strlen(input)); //it can't be larger than the input string, so use that as the size + data = (uint8 *)malloc(strlen(input) + 1); //it can't be larger than the input string, so use that as the size for(i = 0;input[i] != 0;i++){ if(!EditingText){ diff --git a/trunk/src/emufile.cpp b/trunk/src/emufile.cpp index 6e20e06f..5102f2ce 100644 --- a/trunk/src/emufile.cpp +++ b/trunk/src/emufile.cpp @@ -248,7 +248,7 @@ size_t EMUFILE::read8le(u8* val) u8 EMUFILE::read8le() { - u8 temp; + u8 temp = 0; fread(&temp,1); return temp; } diff --git a/trunk/src/video.cpp b/trunk/src/video.cpp index 460c37ea..095d4105 100644 --- a/trunk/src/video.cpp +++ b/trunk/src/video.cpp @@ -170,7 +170,7 @@ void FCEU_PutImage(void) { char nameo[512]; strcpy(nameo,FCEUI_GetSnapshotAsName().c_str()); - if (nameo) + if (nameo[0]) { SaveSnapshot(nameo); FCEU_DispMessage("Snapshot Saved.",0);