diff --git a/src/game/game.cpp b/src/game/game.cpp
index 456e470df..e610cb178 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -122,7 +122,7 @@ void StartMap(const std::string &filename, bool clean)
 	}
 	GetDefaultTextColors(nc, rc);
 
-	CreateGame(filename.c_str(), &Map);
+	CreateGame(filename, &Map);
 
 	UI.StatusLine.Set(NameLine);
 	SetMessage("%s", _("Do it! Do it now!"));
diff --git a/src/stratagus/iolib.cpp b/src/stratagus/iolib.cpp
index e880061a4..6cc8b8be7 100644
--- a/src/stratagus/iolib.cpp
+++ b/src/stratagus/iolib.cpp
@@ -508,11 +508,12 @@ long CFile::PImpl::tell()
 */
 static bool FindFileWithExtension(char *file, size_t filesize)
 {
-	char buf[PATH_MAX];
-
 	if (!access(file, R_OK)) {
 		return true;
 	}
+#if defined(USE_ZLIB) || defined(USE_BZ2LIB)
+	char buf[PATH_MAX];
+#endif
 #ifdef USE_ZLIB // gzip or bzip2 in global shared directory
 	sprintf(buf, "%s.gz", file);
 	if (!access(buf, R_OK)) {