mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Cut the ending \n from all lines in included (exec)files
This commit is contained in:
parent
3af9c3f895
commit
56a238f49b
@ -317,9 +317,13 @@ void ParseStack::DoReadFile(const std::string& key, const std::string& name, int
|
||||
char linebuf[MAXBUF*10];
|
||||
while (fgets(linebuf, sizeof(linebuf), file))
|
||||
{
|
||||
int len = strlen(linebuf);
|
||||
size_t len = strlen(linebuf);
|
||||
if (len)
|
||||
{
|
||||
if (linebuf[len-1] == '\n')
|
||||
len--;
|
||||
cache.push_back(std::string(linebuf, len));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user