mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 15:03:02 +08:00
addSlash - make sure string is null terminated
Change-Id: I2eb0055abf734b68837d07303ff0098e6f912211
This commit is contained in:
@@ -20,7 +20,7 @@ void addSlash(std::string &path) {
|
||||
if (!path.empty()) {
|
||||
auto lastChar = *path.rbegin();
|
||||
if ((lastChar != '/') && (lastChar != '\\')) {
|
||||
path += '/';
|
||||
path.append("/");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user