Skip to content

Commit

Permalink
Fix .. to root folder in relative include
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 authored and madame-rachelle committed Jan 31, 2024
1 parent 9712409 commit 2002396
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/common/scripting/frontend/zcc_parser.cpp
Expand Up @@ -71,9 +71,16 @@ static FString ResolveIncludePath(const FString &path,const FString &lumpname){
{
relativePath = relativePath.Mid(3);
auto slash_index = fullPath.LastIndexOf("/");
if (slash_index != -1) {
if (slash_index != -1)
{
fullPath = fullPath.Mid(0, slash_index);
} else {
}
else if (fullPath.IsNotEmpty())
{
fullPath = "";
}
else
{
pathOk = false;
break;
}
Expand Down

0 comments on commit 2002396

Please sign in to comment.