Correct crash when texture too small loaded in memory tex viewer

Correct current thread PC in the list.
This commit is contained in:
Xele02 committed 2013-02-17 21:43:44 +01:00
1 parent cba9baaca6
commit 6339c2fc9a
2 files changed
+6 -1

No files matched your search

+2
View File
@@ -70,8 +70,10 @@ void Debugger_MemoryTex::on_readBtn_clicked()
state.clutaddr = ui->clutaddr->text().toInt(0,16);
state.clutaddrupper = ui->clutaddrupper->text().toInt(0,16);
state.loadclut = ui->loadclut->text().toInt(0,16);
int bufW = state.texbufwidth[0] & 0x3ff;
int w = 1 << (state.texsize[0] & 0xf);
int h = 1 << ((state.texsize[0]>>8) & 0xf);
w = std::max(bufW,w);
uchar* newData = new uchar[w*h*4];
if(gpu->DecodeTexture(newData, state))