update validAddresses range

This commit is contained in:
daniel229 2015-02-08 11:34:35 +08:00
parent 851070a6f8
commit 3c1644066e
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@
#include "Core/HLE/FunctionWrappers.h"
static u32 sceAdler32(u32 adler, u32 data, u32 datalen) {
if (!Memory::IsValidAddress(data) || !Memory::IsValidAddress(data + datalen)) {
if (!Memory::IsValidAddress(data) || !Memory::IsValidAddress(data + datalen - 1)) {
ERROR_LOG(HLE, "sceAdler32(adler=%08x, data=%08x, datalen=%08x) - bad address(es)", adler, data, datalen);
return -1;
}
@ -43,4 +43,4 @@ const HLEFunction sceAdler[] =
void Register_sceAdler()
{
RegisterModule("sceAdler", ARRAY_SIZE(sceAdler), sceAdler);
}
}

View File

@ -17,4 +17,4 @@
#pragma once
void Register_sceAdler();
void Register_sceAdler();