notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bebe989
)
psxbios: Add checks to strcat
author
gameblabla
<gameblabla@openmailbox.org>
Wed, 17 Jul 2019 23:09:21 +0000
(
01:09
+0200)
committer
gameblabla
<gameblabla@openmailbox.org>
Wed, 17 Jul 2019 23:09:21 +0000
(
01:09
+0200)
Nocash documentation says that function fails if src or dst is 0.
If so, then it must return 0.
This fix is required for fixing crash on bootup in Digimon World.
libpcsxcore/psxbios.c
patch
|
blob
|
blame
|
history
diff --git
a/libpcsxcore/psxbios.c
b/libpcsxcore/psxbios.c
index
292d80d
..
4624bf4
100644
(file)
--- a/
libpcsxcore/psxbios.c
+++ b/
libpcsxcore/psxbios.c
@@
-394,7
+394,12
@@
void psxBios_strcat() { // 0x15
#ifdef PSXBIOS_LOG
PSXBIOS_LOG("psxBios_%s: %s, %s\n", biosA0n[0x15], Ra0, Ra1);
#endif
-
+ if (a0 == 0 || a1 == 0)
+ {
+ v0 = 0;
+ pc0 = ra;
+ return;
+ }
while (*p1++);
--p1;
while ((*p1++ = *p2++) != '\0');