fix missing newline in stb_include

This commit is contained in:
Ricardo Luís Vaz Silva 2025-04-16 16:24:22 -03:00
commit b6bdb7b4e7

View file

@ -174,7 +174,7 @@ FString stb_include_string(FString str, FString filename, TArray<FString> &filen
filenames.Push(filename);
size_t curIndex = filenames.Size();
text.AppendFormat("#line 1 %d // %s\n", curIndex, filename.GetChars());
text.AppendFormat("\n#line 1 %d // %s\n", curIndex, filename.GetChars());
for (int64_t i = 0; i < num; ++i)
{
@ -187,7 +187,7 @@ FString stb_include_string(FString str, FString filename, TArray<FString> &filen
}
text += inc;
text.AppendFormat("#line %d %d // %s\n", inc_list[i].next_line_after, curIndex, filename.GetChars());
text.AppendFormat("\n#line %d %d // %s\n", inc_list[i].next_line_after, curIndex, filename.GetChars());
// no newlines, because we kept the #include newlines, which will get appended next
last = inc_list[i].end;
}