From e2659b63f1c11676c488a1fc3f7d902a8e566eee Mon Sep 17 00:00:00 2001 From: wrenczes Date: Sun, 21 Nov 2010 04:11:23 +0000 Subject: [PATCH] Fixed a couple of sprintfs that wouldn't compile on Linux. --- projects/mtg/src/OptionItem.cpp | 4 ++-- projects/mtg/src/WResourceManager.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/mtg/src/OptionItem.cpp b/projects/mtg/src/OptionItem.cpp index b79db651a..c6a782988 100644 --- a/projects/mtg/src/OptionItem.cpp +++ b/projects/mtg/src/OptionItem.cpp @@ -495,9 +495,9 @@ void OptionTheme::Render() author = ""; bChecked = true; if (selections[value] == "Default") - sprintf(buf, JGE_GET_RES("graphics/themeinfo.txt").c_str()); + sprintf(buf, "%s", JGE_GET_RES("graphics/themeinfo.txt").c_str()); else - sprintf(buf, JGE_GET_RES("themes/%s/themeinfo.txt").c_str(), selections[value].c_str()); + sprintf(buf, "%s%s", JGE_GET_RES("themes/%s/themeinfo.txt").c_str(), selections[value].c_str()); std::ifstream file(buf); if (file) { diff --git a/projects/mtg/src/WResourceManager.cpp b/projects/mtg/src/WResourceManager.cpp index d987b9934..3a56a894e 100644 --- a/projects/mtg/src/WResourceManager.cpp +++ b/projects/mtg/src/WResourceManager.cpp @@ -832,7 +832,7 @@ int WResourceManager::dirOK(string dirname) return (_stat(fname, &statBuffer) >= 0 && // make sure it exists statBuffer.st_mode & S_IFDIR); // and it's not a file #else - sprintf(fname, JGE_GET_RES(dirname).c_str()); + sprintf(fname, "%s", JGE_GET_RES(dirname).c_str()); struct stat st; if (stat(fname, &st) == 0) return 1; #endif