From b86a95c7016748add7d0a746b4dc6b2a4e3ddc43 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 26 May 2007 20:10:53 +0000 Subject: This should do it git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7158 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/configreader.cpp | 4 ++-- win/inspircd_win32wrapper.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/configreader.cpp b/src/configreader.cpp index 1976baf37..2f484293f 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -1602,10 +1602,10 @@ bool ServerConfig::DirValid(const char* dirandfile) std::string ServerConfig::GetFullProgDir() { - char buffer[1024]; + char buffer[PATH_MAX]; // Get the current working directory - if (getcwd(buffer, 1024)) + if (getcwd(buffer, PATH_MAX)) { std::string remainder = this->argv[0]; diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index dc1157545..c8075b902 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -25,6 +25,9 @@ /* Make builds smaller, leaner and faster */ #define VC_EXTRALEAN +/* They just have to be *different*, don't they. */ +#define PATH_MAX MAX_PATH + /* Begone shitty 'safe STL' warnings */ #define _SCL_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS -- cgit v1.2.3