notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
release r19
[pcsx_rearmed.git]
/
libpcsxcore
/
psxbios.c
diff --git
a/libpcsxcore/psxbios.c
b/libpcsxcore/psxbios.c
index
fdc129e
..
12c17ef
100644
(file)
--- a/
libpcsxcore/psxbios.c
+++ b/
libpcsxcore/psxbios.c
@@
-990,7
+990,7
@@
_start:
case 'g': case 'G':
ptmp += sprintf(ptmp, tmp2, (double)psxMu32(sp + n * 4)); n++; break;
case 'p':
case 'g': case 'G':
ptmp += sprintf(ptmp, tmp2, (double)psxMu32(sp + n * 4)); n++; break;
case 'p':
- case 'i':
+ case 'i':
case 'u':
case 'd': case 'D':
case 'o': case 'O':
case 'x': case 'X':
case 'd': case 'D':
case 'o': case 'O':
case 'x': case 'X':
@@
-1837,7
+1837,8
@@
int nfile;
if ((*ptr & 0xF0) != 0x50) continue; \
ptr+= 0xa; \
if (pfile[0] == 0) { \
if ((*ptr & 0xF0) != 0x50) continue; \
ptr+= 0xa; \
if (pfile[0] == 0) { \
- strcpy(dir->name, ptr); \
+ strncpy(dir->name, ptr, sizeof(dir->name)); \
+ dir->name[sizeof(dir->name) - 1] = '\0'; \
} else for (i=0; i<20; i++) { \
if (pfile[i] == ptr[i]) { \
dir->name[i] = ptr[i]; \
} else for (i=0; i<20; i++) { \
if (pfile[i] == ptr[i]) { \
dir->name[i] = ptr[i]; \