misc: merge from pcsxr r91261,r91276
authornotaz <notasas@gmail.com>
Sun, 21 Dec 2014 19:00:34 +0000 (21:00 +0200)
committernotaz <notasas@gmail.com>
Sun, 21 Dec 2014 19:02:25 +0000 (21:02 +0200)
Author: edgbla
Small fixes. 11834, 11836 (Lioncash);

libpcsxcore/cdriso.c
libpcsxcore/misc.c

index 2c9e692..b733f5b 100644 (file)
@@ -552,9 +552,9 @@ static int parsecue(const char *isofile) {
                        pregapOffset = -1; // mark to fill track start_offset
                }
                else if (!strcmp(token, "FILE")) {
-                       t = sscanf(linebuf, " FILE \"%256[^\"]\"", tmpb);
+                       t = sscanf(linebuf, " FILE \"%255[^\"]\"", tmpb);
                        if (t != 1)
-                               sscanf(linebuf, " FILE %256s", tmpb);
+                               sscanf(linebuf, " FILE %255s", tmpb);
 
                        // absolute path?
                        ti[numtracks + 1].handle = fopen(tmpb, "rb");
index 14f68ec..3ee9876 100644 (file)
@@ -208,9 +208,9 @@ int LoadCdrom() {
                // read the SYSTEM.CNF
                READTRACK();
 
-               sscanf((char *)buf + 12, "BOOT = cdrom:\\%256s", exename);
+               sscanf((char *)buf + 12, "BOOT = cdrom:\\%255s", exename);
                if (GetCdromFile(mdir, time, exename) == -1) {
-                       sscanf((char *)buf + 12, "BOOT = cdrom:%256s", exename);
+                       sscanf((char *)buf + 12, "BOOT = cdrom:%255s", exename);
                        if (GetCdromFile(mdir, time, exename) == -1) {
                                char *ptr = strstr((char *)buf + 12, "cdrom:");
                                if (ptr != NULL) {
@@ -268,7 +268,7 @@ int LoadCdromFile(const char *filename, EXE_HEADER *head) {
        u32 size, addr;
        void *mem;
 
-       sscanf(filename, "cdrom:\\%256s", exename);
+       sscanf(filename, "cdrom:\\%255s", exename);
 
        time[0] = itob(0); time[1] = itob(2); time[2] = itob(0x10);
 
@@ -338,9 +338,9 @@ int CheckCdrom() {
        if (GetCdromFile(mdir, time, "SYSTEM.CNF;1") != -1) {
                READTRACK();
 
-               sscanf(buf + 12, "BOOT = cdrom:\\%256s", exename);
+               sscanf(buf + 12, "BOOT = cdrom:\\%255s", exename);
                if (GetCdromFile(mdir, time, exename) == -1) {
-                       sscanf(buf + 12, "BOOT = cdrom:%256s", exename);
+                       sscanf(buf + 12, "BOOT = cdrom:%255s", exename);
                        if (GetCdromFile(mdir, time, exename) == -1) {
                                char *ptr = strstr(buf + 12, "cdrom:");                 // possibly the executable is in some subdir
                                if (ptr != NULL) {