diff options
-rw-r--r-- | src/configreader.cpp | 4 | ||||
-rw-r--r-- | 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
|