addSlash - make sure string is null terminated

Change-Id: I2eb0055abf734b68837d07303ff0098e6f912211
This commit is contained in:
chmielew
2019-07-19 13:36:00 +02:00
committed by sys_ocldev
parent 95c2dcd8b0
commit 2ad0114ef7

View File

@@ -20,7 +20,7 @@ void addSlash(std::string &path) {
if (!path.empty()) {
auto lastChar = *path.rbegin();
if ((lastChar != '/') && (lastChar != '\\')) {
path += '/';
path.append("/");
}
}
}