summaryrefslogtreecommitdiff
path: root/src/logger.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2013-05-22 21:18:50 +0100
committerPeter Powell <petpow@saberuk.com>2013-06-06 01:45:04 +0100
commit37d97550b147e0d14f6a9e279f8505b7d49c84bb (patch)
tree207d703258746f1bc0902c638e511d60437dfb44 /src/logger.cpp
parente01df6385ef2ad1c0a78ccdd08af9af3ce688264 (diff)
Convert a ton of uses of MAXBUF to use a fixed buffer size.
Diffstat (limited to 'src/logger.cpp')
-rw-r--r--src/logger.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/logger.cpp b/src/logger.cpp
index 1a63499d6..03960f4a1 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -116,10 +116,10 @@ void LogManager::OpenFileLogs()
std::map<std::string, FileWriter*>::iterator fwi = logmap.find(target);
if (fwi == logmap.end())
{
- char realtarget[MAXBUF];
+ char realtarget[256];
time_t time = ServerInstance->Time();
struct tm *mytime = gmtime(&time);
- strftime(realtarget, MAXBUF, target.c_str(), mytime);
+ strftime(realtarget, sizeof(realtarget), target.c_str(), mytime);
FILE* f = fopen(realtarget, "a");
fw = new FileWriter(f);
logmap.insert(std::make_pair(target, fw));