Fix some overflow/null deref warnings.

This commit is contained in:
Unknown W. Brackets 2013-08-12 23:33:52 -07:00
parent 83373b8d87
commit 8830d3603e
2 changed files with 2 additions and 2 deletions

View File

@ -914,7 +914,7 @@ void PostPutAction::run(MipsCall &call) {
WARN_LOG(HLE, "sceMpegRingbufferPut clamping packetsAdded old=%i new=%i", packetsAdded, ringbuffer.packetsFree);
packetsAdded = ringbuffer.packetsFree;
}
int actuallyAdded = ctx->mediaengine->addStreamData(Memory::GetPointer(ringbuffer.data), packetsAdded * 2048) / 2048;
int actuallyAdded = ctx->mediaengine == NULL ? 8 : ctx->mediaengine->addStreamData(Memory::GetPointer(ringbuffer.data), packetsAdded * 2048) / 2048;
if (actuallyAdded != packetsAdded) {
WARN_LOG_REPORT(HLE, "sceMpegRingbufferPut(): unable to enqueue all added packets, going to overwrite some frames.");
}

View File

@ -679,7 +679,7 @@ lMaybeLDRHetc:
case 13:
case 14: // FPU
{
char text[256];
char text[128];
if (!DisasmVFP(instr, text)) {
goto lUndefined;
break;