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:
bf643fd
)
psxbios: Add checks for memchr.
author
gameblabla
<gameblabla@openmailbox.org>
Sun, 21 Jul 2019 05:43:56 +0000
(07:43 +0200)
committer
gameblabla
<gameblabla@openmailbox.org>
Sun, 21 Jul 2019 05:43:56 +0000
(07:43 +0200)
libpcsxcore/psxbios.c
patch
|
blob
|
blame
|
history
diff --git
a/libpcsxcore/psxbios.c
b/libpcsxcore/psxbios.c
index
7b2c05f
..
3247402
100644
(file)
--- 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;