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:
4ee246e
)
misc: accept a path without slash
author
notaz
<notasas@gmail.com>
Thu, 10 Aug 2023 23:01:11 +0000
(
02:01
+0300)
committer
notaz
<notasas@gmail.com>
Thu, 10 Aug 2023 23:06:18 +0000
(
02:06
+0300)
libpcsxcore/misc.c
patch
|
blob
|
blame
|
history
diff --git
a/libpcsxcore/misc.c
b/libpcsxcore/misc.c
index
252e1c8
..
bba81b1
100644
(file)
--- a/
libpcsxcore/misc.c
+++ b/
libpcsxcore/misc.c
@@
-304,10
+304,16
@@
int LoadCdromFile(const char *filename, EXE_HEADER *head) {
u8 time[4],*buf;
u8 mdir[4096];
char exename[256];
+ const char *p1, *p2;
u32 size, addr;
void *mem;
- sscanf(filename, "cdrom:\\%255s", exename);
+ p1 = filename;
+ if ((p2 = strchr(p1, ':')))
+ p1 = p2 + 1;
+ while (*p1 == '\\')
+ p1++;
+ snprintf(exename, sizeof(exename), "%s", p1);
time[0] = itob(0); time[1] = itob(2); time[2] = itob(0x10);