diff --git a/src/drivers/win/debugger.cpp b/src/drivers/win/debugger.cpp index 35d08982..1e9c5846 100644 --- a/src/drivers/win/debugger.cpp +++ b/src/drivers/win/debugger.cpp @@ -603,7 +603,6 @@ void Disassemble(HWND hWnd, int id, int scrollid, unsigned int addr) strcat(debug_str, chr); } else { - char* a; if ((addr + size) > 0xFFFF) { while (addr < 0xFFFF) @@ -624,28 +623,30 @@ void Disassemble(HWND hWnd, int id, int scrollid, unsigned int addr) size++; } - a = Disassemble(addr, opcode); + static char bufferForDisassemblyWithPlentyOfStuff[64+NL_MAX_NAME_LEN*10]; //"plenty" + char* _a = Disassemble(addr, opcode); + strcpy(bufferForDisassemblyWithPlentyOfStuff, _a); if (symbDebugEnabled) { - replaceNames(ramBankNames, a, &disassembly_operands[i]); + replaceNames(ramBankNames, bufferForDisassemblyWithPlentyOfStuff, &disassembly_operands[i]); for(int p=0;p