summaryrefslogtreecommitdiffhomepage
path: root/loader/atlas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'loader/atlas.cpp')
-rw-r--r--loader/atlas.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/loader/atlas.cpp b/loader/atlas.cpp
index 68a94f0b..7d8539da 100644
--- a/loader/atlas.cpp
+++ b/loader/atlas.cpp
@@ -22,8 +22,9 @@ StringView loader_::make_atlas_path(char(&buf)[FILENAME_MAX], StringView dir, St
fm_soft_assert(dirsiz + namesiz + 1 < FILENAME_MAX);
std::memcpy(buf, dir.data(), dirsiz);
std::memcpy(&buf[dirsiz], name.data(), namesiz);
- buf[dirsiz + namesiz] = '\0';
- return StringView{buf};
+ auto len = dirsiz + namesiz;
+ buf[len] = '\0';
+ return StringView{buf, len, StringViewFlag::NullTerminated};
}
bool loader_::check_atlas_name(StringView str) noexcept