aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authorretro-wertz2019-08-02 20:55:20 +0800
committerretro-wertz2019-08-02 20:55:20 +0800
commit208177a7ea246a6e26222500da945a414b292b57 (patch)
tree00fe89450ca22056153f2296a56cd6bf1f26bfb7 /libpcsxcore
parentcf4334ed9741d6247673fefa057b71926b2e1cfe (diff)
downloadpcsx_rearmed-208177a7ea246a6e26222500da945a414b292b57.tar.gz
pcsx_rearmed-208177a7ea246a6e26222500da945a414b292b57.tar.bz2
pcsx_rearmed-208177a7ea246a6e26222500da945a414b292b57.zip
Sanitize Loaded CD image string in log
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/cdriso.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c
index 975105e..daed921 100644
--- a/libpcsxcore/cdriso.c
+++ b/libpcsxcore/cdriso.c
@@ -1349,6 +1349,7 @@ static long CALLBACK ISOopen(void) {
boolean isMode1ISO = FALSE;
char alt_bin_filename[MAXPATHLEN];
const char *bin_filename;
+ char image_str[1024] = {0};
if (cdHandle != NULL) {
return 0; // it's already open
@@ -1361,7 +1362,7 @@ static long CALLBACK ISOopen(void) {
return -1;
}
- SysPrintf(_("Loaded CD Image: %s"), GetIsoFile());
+ sprintf(image_str, "Loaded CD Image: %s", GetIsoFile());
cddaBigEndian = FALSE;
subChanMixed = FALSE;
@@ -1374,40 +1375,40 @@ static long CALLBACK ISOopen(void) {
cdimg_read_func = cdread_normal;
if (parsetoc(GetIsoFile()) == 0) {
- SysPrintf("[+toc]");
+ strcat(image_str, "[+toc]");
}
else if (parseccd(GetIsoFile()) == 0) {
- SysPrintf("[+ccd]");
+ strcat(image_str, "[+ccd]");
}
else if (parsemds(GetIsoFile()) == 0) {
- SysPrintf("[+mds]");
+ strcat(image_str, "[+mds]");
}
else if (parsecue(GetIsoFile()) == 0) {
- SysPrintf("[+cue]");
+ strcat(image_str, "[+cue]");
}
if (handlepbp(GetIsoFile()) == 0) {
- SysPrintf("[pbp]");
+ strcat(image_str, "[+pbp]");
CDR_getBuffer = ISOgetBuffer_compr;
cdimg_read_func = cdread_compressed;
}
else if (handlecbin(GetIsoFile()) == 0) {
- SysPrintf("[cbin]");
+ strcat(image_str, "[+cbin]");
CDR_getBuffer = ISOgetBuffer_compr;
cdimg_read_func = cdread_compressed;
}
#ifdef HAVE_CHD
else if (handlechd(GetIsoFile()) == 0) {
- SysPrintf("[chd]");
+ strcat(image_str, "[+chd]");
CDR_getBuffer = ISOgetBuffer_chd;
cdimg_read_func = cdread_chd;
}
#endif
if (!subChanMixed && opensubfile(GetIsoFile()) == 0) {
- SysPrintf("[+sub]");
+ strcat(image_str, "[+sub]");
}
if (opensbifile(GetIsoFile()) == 0) {
- SysPrintf("[+sbi]");
+ strcat(image_str, "[+sbi]");
}
fseeko(cdHandle, 0, SEEK_END);
@@ -1445,13 +1446,13 @@ static long CALLBACK ISOopen(void) {
fseek(cdHandle, 0, SEEK_SET);
fread(&modeTest, 4, 1, cdHandle);
if (SWAP32(modeTest) != 0xffffff00) {
- SysPrintf("[2048]");
+ strcat(image_str, "[2048]");
isMode1ISO = TRUE;
}
}
fseek(cdHandle, 0, SEEK_SET);
- SysPrintf(".\n");
+ SysPrintf("%s.\n", image_str);
PrintTracks();