aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/psxbios.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpcsxcore/psxbios.c')
-rw-r--r--libpcsxcore/psxbios.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c
index 67a01e5..4019234 100644
--- a/libpcsxcore/psxbios.c
+++ b/libpcsxcore/psxbios.c
@@ -739,15 +739,20 @@ void psxBios_tolower() { // 0x26
void psxBios_bcopy() { // 0x27
char *p1 = (char *)Ra1, *p2 = (char *)Ra0;
+ v0 = a0;
+ if (a0 == 0 || a2 > 0x7FFFFFFF)
+ {
+ pc0 = ra;
+ return;
+ }
while ((s32)a2-- > 0) *p1++ = *p2++;
-
+ a2 = 0;
pc0 = ra;
}
void psxBios_bzero() { // 0x28
char *p = (char *)Ra0;
while ((s32)a1-- > 0) *p++ = '\0';
-
pc0 = ra;
}