diff --git a/src/ox/fs/filesystem/filelocation.cpp b/src/ox/fs/filesystem/filelocation.cpp index ccd207e84..3b6cb2230 100644 --- a/src/ox/fs/filesystem/filelocation.cpp +++ b/src/ox/fs/filesystem/filelocation.cpp @@ -30,8 +30,9 @@ FileAddress::FileAddress(uint64_t inode) noexcept { FileAddress::FileAddress(ox::CRStringView path) noexcept { auto pathSize = path.bytes(); - m_data.path = new char[pathSize]; + m_data.path = new char[pathSize + 1]; memcpy(m_data.path, path.data(), pathSize); + m_data.path[pathSize] = 0; m_type = FileAddressType::Path; }