some missing error handling
[pcsx_rearmed.git] / libpcsxcore / sio.c
index 8392fd8..44957d3 100644 (file)
@@ -72,12 +72,10 @@ char Mcd1Data[MCD_SIZE], Mcd2Data[MCD_SIZE];
 char McdDisable[2];
 
 #define SIO_INT(eCycle) { \
-       if (!Config.Sio) { \
-               psxRegs.interrupt |= (1 << PSXINT_SIO); \
-               psxRegs.intCycle[PSXINT_SIO].cycle = eCycle; \
-               psxRegs.intCycle[PSXINT_SIO].sCycle = psxRegs.cycle; \
-               new_dyna_set_event(PSXINT_SIO, eCycle); \
-       } \
+       psxRegs.interrupt |= (1 << PSXINT_SIO); \
+       psxRegs.intCycle[PSXINT_SIO].cycle = eCycle; \
+       psxRegs.intCycle[PSXINT_SIO].sCycle = psxRegs.cycle; \
+       new_dyna_set_event(PSXINT_SIO, eCycle); \
 }
 
 // clk cycle byte
@@ -694,6 +692,7 @@ void ConvertMcd(char *mcd, char *data) {
                        fclose(f);
                }
                f = fopen(mcd, "r+");
+               if (f == NULL) return;
                s = s + 3904;
                fputc('1', f); s--;
                fputc('2', f); s--;
@@ -728,6 +727,7 @@ void ConvertMcd(char *mcd, char *data) {
                        fclose(f);
                }
                f = fopen(mcd, "r+");
+               if (f == NULL) return;
                s = s + 64;
                fputc('V', f); s--;
                fputc('g', f); s--;