From e412ecdefe022330c6925634a75092a018f99751 Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 2 Dec 2011 19:28:39 +0100 Subject: [PATCH 1/2] Do not exit() prematurely. --- file.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/file.c b/file.c index a064c69adc..99d22e7fd9 100644 --- a/file.c +++ b/file.c @@ -754,7 +754,7 @@ static bool load_normal_rom(void) if (!g_extern.rom_file) { SSNES_ERR("Implementation requires a full path to be set, cannot load ROM from stdin. Aborting ...\n"); - exit(1); + return false; } fclose(g_extern.rom_file); @@ -767,12 +767,11 @@ static bool load_normal_rom(void) { SSNES_ERR("ROM file is not valid!\n"); free(rom_buf); + free(xml_buf); return false; } - if (xml_buf) - free(xml_buf); - + free(xml_buf); free(rom_buf); return true; } From 6538312d86664e066e739b9a55c901ffa731a93d Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 2 Dec 2011 21:16:51 +0100 Subject: [PATCH 2/2] Fix some includes. --- conf/config_file.c | 6 +++--- general.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/config_file.c b/conf/config_file.c index 8c1cea1052..e34fa926bd 100644 --- a/conf/config_file.c +++ b/conf/config_file.c @@ -22,11 +22,11 @@ #include #include #include -#include "strl.h" +#include "../strl.h" -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(__CELLOS_LV2__) #include // MAXPATHLEN -#else +#elif defined(_WIN32) #define WIN32_LEAN_AND_MEAN #include #endif diff --git a/general.h b/general.h index 46e59c0576..639a14dbe8 100644 --- a/general.h +++ b/general.h @@ -42,9 +42,9 @@ #include "audio/hermite.h" -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(__CELLOS_LV2__) #include // MAXPATHLEN -#else +#elif defined(_WIN32) #define WIN32_LEAN_AND_MEAN #include #endif