From ab9930c855eacee4e86d728a64d5bfe1b46105d0 Mon Sep 17 00:00:00 2001 From: Saggi Mizrahi Date: Mon, 29 Oct 2012 00:39:01 -0400 Subject: [PATCH] Fix wierd (null) error Signed-off-by: Saggi Mizrahi --- libretro/libretro.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/libretro/libretro.c b/libretro/libretro.c index 127ffd6..98a4430 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -850,27 +850,27 @@ bool retro_load_game(const struct retro_game_info *info) dir = g_rom_dir; } #if defined(_WIN32) && !defined(_XBOX360) - snprintf(&slash, sizeof(slash), "\\"); + slash = '\\'; #elif defined(_WIN32) && defined(_XBOX360) - snprintf(&slash, sizeof(slash), ""); + slash = '\0'; #else - snprintf(&slash, sizeof(slash), "/"); + slash = '/'; #endif - snprintf(CD_BRAM_EU, sizeof(CD_BRAM_EU), "%s%sscd_E.brm", dir, slash); - snprintf(CD_BRAM_US, sizeof(CD_BRAM_US), "%s%sscd_U.brm", dir, slash); - snprintf(CD_BRAM_JP, sizeof(CD_BRAM_JP), "%s%sscd_J.brm", dir, slash); - snprintf(CD_BIOS_EU, sizeof(CD_BIOS_EU), "%s%sbios_CD_E.bin", dir, slash); - snprintf(CD_BIOS_US, sizeof(CD_BIOS_US), "%s%sbios_CD_U.bin", dir, slash); - snprintf(CD_BIOS_JP, sizeof(CD_BIOS_JP), "%s%sbios_CD_J.bin", dir, slash); - snprintf(MS_BIOS_EU, sizeof(MS_BIOS_EU), "%s%sbios_E.sms", dir, slash); - snprintf(MS_BIOS_US, sizeof(MS_BIOS_US), "%s%sbios_U.sms", dir, slash); - snprintf(MS_BIOS_JP, sizeof(MS_BIOS_JP), "%s%sbios_J.sms", dir, slash); - snprintf(GG_BIOS, sizeof(GG_BIOS), "%s%sbios.gg", dir, slash); - snprintf(SK_ROM, sizeof(SK_ROM), "%s%ssk.bin", dir, slash); - snprintf(SK_UPMEM, sizeof(SK_UPMEM), "%s%ssk2chip.bin", dir, slash); - snprintf(GG_ROM, sizeof(GG_ROM), "%s%sggenie.bin", dir, slash); - snprintf(AR_ROM, sizeof(AR_ROM), "%s%sareplay.bin", dir, slash); + snprintf(CD_BRAM_EU, sizeof(CD_BRAM_EU), "%s%cscd_E.brm", dir, slash); + snprintf(CD_BRAM_US, sizeof(CD_BRAM_US), "%s%cscd_U.brm", dir, slash); + snprintf(CD_BRAM_JP, sizeof(CD_BRAM_JP), "%s%cscd_J.brm", dir, slash); + snprintf(CD_BIOS_EU, sizeof(CD_BIOS_EU), "%s%cbios_CD_E.bin", dir, slash); + snprintf(CD_BIOS_US, sizeof(CD_BIOS_US), "%s%cbios_CD_U.bin", dir, slash); + snprintf(CD_BIOS_JP, sizeof(CD_BIOS_JP), "%s%cbios_CD_J.bin", dir, slash); + snprintf(MS_BIOS_EU, sizeof(MS_BIOS_EU), "%s%cbios_E.sms", dir, slash); + snprintf(MS_BIOS_US, sizeof(MS_BIOS_US), "%s%cbios_U.sms", dir, slash); + snprintf(MS_BIOS_JP, sizeof(MS_BIOS_JP), "%s%cbios_J.sms", dir, slash); + snprintf(GG_BIOS, sizeof(GG_BIOS), "%s%cbios.gg", dir, slash); + snprintf(SK_ROM, sizeof(SK_ROM), "%s%csk.bin", dir, slash); + snprintf(SK_UPMEM, sizeof(SK_UPMEM), "%s%csk2chip.bin", dir, slash); + snprintf(GG_ROM, sizeof(GG_ROM), "%s%cggenie.bin", dir, slash); + snprintf(AR_ROM, sizeof(AR_ROM), "%s%careplay.bin", dir, slash); fprintf(stderr, "Sega CD EU BRAM should be located at: %s\n", CD_BRAM_EU); fprintf(stderr, "Sega CD US BRAM should be located at: %s\n", CD_BRAM_US); fprintf(stderr, "Sega CD JP BRAM should be located at: %s\n", CD_BRAM_JP);