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:
c3d791f
)
psxbios: Add checks for strlen.
author
gameblabla
<gameblabla@openmailbox.org>
Thu, 18 Jul 2019 00:28:55 +0000
(
02:28
+0200)
committer
gameblabla
<gameblabla@openmailbox.org>
Thu, 18 Jul 2019 00:28:55 +0000
(
02:28
+0200)
Per what Nocash documentation says.
libpcsxcore/psxbios.c
patch
|
blob
|
blame
|
history
diff --git
a/libpcsxcore/psxbios.c
b/libpcsxcore/psxbios.c
index
13cfe73
..
cd2fb0c
100644
(file)
--- a/
libpcsxcore/psxbios.c
+++ b/
libpcsxcore/psxbios.c
@@
-666,6
+666,11
@@
void psxBios_strncpy() { // 0x1a
void psxBios_strlen() { // 0x1b
char *p = (char *)Ra0;
v0 = 0;
+ if (a0 == 0)
+ {
+ pc0 = ra;
+ return;
+ }
while (*p++) v0++;
pc0 = ra;
}