all repos — mgba @ a1eb021af5ef63072e2c71af57f6e7a7da3d2585

mGBA Game Boy Advance Emulator

PSP2: Use VFileOpen in VDirSce.open to ensure file modes are translated properly
Jeffrey Pfau jeffrey@endrift.com
Tue, 25 Aug 2015 22:40:53 -0700
commit

a1eb021af5ef63072e2c71af57f6e7a7da3d2585

parent

e37a3253da794d75cd8fa21e6b5e0a1a919098ed

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/platform/psp2/sce-vfs.csrc/platform/psp2/sce-vfs.c

@@ -181,10 +181,10 @@ if (!path) {

return 0; } const char* dir = vdsce->path; - char* combined = malloc(sizeof(char) * (strlen(path) + strlen(dir) + 2)); + char* combined = malloc(sizeof(char) * (strlen(path) + strlen(dir) + strlen(PATH_SEP) + 1)); sprintf(combined, "%s%s%s", dir, PATH_SEP, path); - struct VFile* file = VFileOpenSce(combined, mode, 0666); + struct VFile* file = VFileOpen(combined, mode); free(combined); return file; }