Fixed a couple of sprintfs that wouldn't compile on Linux.
This commit is contained in:
@@ -495,9 +495,9 @@ void OptionTheme::Render()
|
|||||||
author = "";
|
author = "";
|
||||||
bChecked = true;
|
bChecked = true;
|
||||||
if (selections[value] == "Default")
|
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
|
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);
|
std::ifstream file(buf);
|
||||||
if (file)
|
if (file)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -832,7 +832,7 @@ int WResourceManager::dirOK(string dirname)
|
|||||||
return (_stat(fname, &statBuffer) >= 0 && // make sure it exists
|
return (_stat(fname, &statBuffer) >= 0 && // make sure it exists
|
||||||
statBuffer.st_mode & S_IFDIR); // and it's not a file
|
statBuffer.st_mode & S_IFDIR); // and it's not a file
|
||||||
#else
|
#else
|
||||||
sprintf(fname, JGE_GET_RES(dirname).c_str());
|
sprintf(fname, "%s", JGE_GET_RES(dirname).c_str());
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if (stat(fname, &st) == 0) return 1;
|
if (stat(fname, &st) == 0) return 1;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user