sifadil / pcsx2-playground

Automatically exported from code.google.com/p/pcsx2-playground
2 stars 0 forks source link

disR5900.cpp return COP0_LOG more 2040 length #104

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
DisR5900CurrentState::getString() return char*, so it could be at almost
any length. But all logs have 2040 limit, so it's segfaulted at assertion.

The evil code is:

const char* DisR5900CurrentState::getString()
{   
    disR5900F( result, cpuRegs.code, cpuRegs.pc );
    return result.c_str();
}

But the reason is in result variable, which is newer flushed, only appened.
Hard to say, where it is declared, so if I add 

string result ;

declaration, this issue is resolved.

Original issue reported on code.google.com by Zeydl...@gmail.com on 1 Jan 2009 at 3:21

Attachments:

GoogleCodeExporter commented 8 years ago
Yeah, I know.  I plan to finish converting the whole thing to use std::string 
soon...
I just keep getting sidetracked by other more immediate issues and requests. :/

Original comment by Jake.Stine on 1 Jan 2009 at 6:12

GoogleCodeExporter commented 8 years ago
Fixed this a while back.  :)

Original comment by Jake.Stine on 29 Jan 2009 at 12:53