X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigreader.cpp;h=19f5cc21cd8df5cff0389890eb377689dbab68a9;hb=1519698640ed3fb389b87bb9272f523f40745260;hp=aaff93ef9a852b83c6b98b89fe8385a47bc3f617;hpb=424ee85016ca3557b12caf2a3b7b9de9582bd17f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configreader.cpp b/src/configreader.cpp index aaff93ef9..19f5cc21c 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -528,7 +528,7 @@ bool DoConnect(ServerConfig* conf, const char*, char**, ValueList &values, int*) ((*name && (cc->GetName() == name)) || // if the name is the same (*allow && (cc->GetHost() == allow)) || // or the allow is the same (*deny && (cc->GetHost() == deny))) && // or the deny is the same - (!port || port && (cc->GetPort() == port)) // and there is no port, or there is a port and the port is the same + (!port || (port && (cc->GetPort() == port))) // and there is no port, or there is a port and the port is the same ) { /* reenable class so users can be shoved into it :P */ @@ -2071,7 +2071,7 @@ bool ServerConfig::DirValid(const char* dirandfile) std::string ServerConfig::GetFullProgDir() { - char buffer[PATH_MAX+1]; + char buffer[4096]; #ifdef WINDOWS /* Windows has specific api calls to get the exe path that never fail. * For once, windows has something of use, compared to the POSIX code @@ -2085,7 +2085,7 @@ std::string ServerConfig::GetFullProgDir() } #else // Get the current working directory - if (getcwd(buffer, PATH_MAX)) + if (getcwd(buffer, 4096)) { std::string remainder = this->argv[0];