Skip to content

Commit

Permalink
Fix a bug which access out of memory in Combine
Browse files Browse the repository at this point in the history
  • Loading branch information
durswd committed Aug 2, 2023
1 parent 82f72ca commit 124471e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dev/Cpp/Effekseer/Effekseer/Utils/String.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ class PathHelper
static STRING Combine(const STRING& path1, const STRING& path2)
{
STRING ret = path1;
if (!IsSeparator(ret.back()))
if (ret.size() > 0 && !IsSeparator(ret.back()))
{
ret += static_cast<T>('/');
}
Expand Down

0 comments on commit 124471e

Please sign in to comment.