diff --git a/src/agistudio.pro b/src/agistudio.pro index c8ac8f8..ed05e1f 100644 --- a/src/agistudio.pro +++ b/src/agistudio.pro @@ -1,6 +1,7 @@ TEMPLATE = app CONFIG = qt warn_on release thread #CONFIG = qt warn_on debug thread +#CONFIG += static # win32 static linking # DEFINES += QT_DLL QT_THREAD_SUPPORT # win32 QMAKE_CXXFLAGS += -Wno-unused-result HEADERS = agicommands.h \ diff --git a/src/game.cpp b/src/game.cpp index 8af7275..450972a 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -302,8 +302,8 @@ int Game::from_template(string name) struct _finddata_t c_file; long hFile; if ((hFile = _findfirst(tmp, &c_file)) != -1L) do { - sprintf(tmp2,"%s/%s",templatedir.c_str(),c_file.name); - cfilename = tmp2; + sprintf(tmp,"%s/%s",templatedir.c_str(),c_file.name); + cfilename = tmp; #else glob_t globbuf; glob(tmp, 0, NULL, &globbuf); @@ -335,8 +335,8 @@ int Game::from_template(string name) sprintf(tmp,"%s/src/*",templatedir.c_str()); #ifdef _WIN32 if ((hFile = _findfirst(tmp, &c_file)) != -1L) do { - sprintf(tmp2,"%s/src/%s",templatedir.c_str(),c_file.name); - cfilename = tmp2; + sprintf(tmp,"%s/src/%s",templatedir.c_str(),c_file.name); + cfilename = tmp; #else glob(tmp, 0, NULL, &globbuf); for(i=0;i<(int)globbuf.gl_pathc;i++){ //copy template src subdirectory