diff options
Diffstat (limited to 'libpcsxcore/psxbios.c')
-rw-r--r-- | libpcsxcore/psxbios.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c index 4019234..c362a75 100644 --- a/libpcsxcore/psxbios.c +++ b/libpcsxcore/psxbios.c @@ -752,7 +752,21 @@ void psxBios_bcopy() { // 0x27 void psxBios_bzero() { // 0x28 char *p = (char *)Ra0; + v0 = a0; + /* Same as memset here (See memset below) */ + if (a1 > 0x7FFFFFFF || a1 == 0) + { + v0 = 0; + pc0 = ra; + return; + } + else if (a0 == 0) + { + pc0 = ra; + return; + } while ((s32)a1-- > 0) *p++ = '\0'; + a1 = 0; pc0 = ra; } |