From b5e8bc9ec1b88047ac5dd732b4190f4e75ce199f Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Sun, 19 Mar 2006 20:14:24 +0000 Subject: [PATCH] fixed bug at26868 --- amxmodx/amxxlog.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/amxmodx/amxxlog.cpp b/amxmodx/amxxlog.cpp index 8a625756..5251a5f3 100755 --- a/amxmodx/amxxlog.cpp +++ b/amxmodx/amxxlog.cpp @@ -92,10 +92,12 @@ void CLog::CreateNewFile() time(&td); tm *curTime = localtime(&td); + char file[256]; int i = 0; while (true) { + m_LogFile.assign(build_pathname_r(file, sizeof(file)-1, "%s/L%02d%02d%03d.log", g_log_dir.c_str(), curTime->tm_mon + 1, curTime->tm_mday, i)); FILE *pTmpFile = fopen(m_LogFile.c_str(), "r"); // open for reading to check whether the file exists if (!pTmpFile)