aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/psxbios.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c
index 7b2c05f..3247402 100644
--- a/libpcsxcore/psxbios.c
+++ b/libpcsxcore/psxbios.c
@@ -924,6 +924,12 @@ void psxBios_memcmp() { // 0x2d
void psxBios_memchr() { // 0x2e
char *p = (char *)Ra0;
+
+ if (a0 == 0 || a2 > 0x7FFFFFFF)
+ {
+ pc0 = ra;
+ return;
+ }
while ((s32)a2-- > 0) {
if (*p++ != (s8)a1) continue;