Commits

spencercw  committed bc76ec7

Fix address type which caused truncation on ROMs >64kB.

  • Participants
  • Parent commits cf9e3b5
  • Branches debugger

Comments (0)

Files changed (1)

File gb_emulator/src/gb_memory.cpp

 		return vram[ptr - VIDEO_RAM + VRAM_BANK_SIZE * vramBank];
 	else if (ptr >= ROM_BANKX)
 	{
-		uint16_t addr = ptr - ROM_BANKX + ROM_BANK_SIZE * romBank;
+		size_t addr = ptr - ROM_BANKX + ROM_BANK_SIZE * romBank;
 		if (addr < gb_.rom_.length())
 		{
 			return gb_.rom_[addr];