From 71f6364ea3edea98cf48579e1a299e6cf8f68d6c Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 18 May 2022 03:27:45 -0500 Subject: [PATCH] [ox/fs] Fix FileAddress(String) to allocate correct amount of memory --- deps/ox/src/ox/fs/filesystem/filelocation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/ox/src/ox/fs/filesystem/filelocation.cpp b/deps/ox/src/ox/fs/filesystem/filelocation.cpp index 4290beed..75212f2a 100644 --- a/deps/ox/src/ox/fs/filesystem/filelocation.cpp +++ b/deps/ox/src/ox/fs/filesystem/filelocation.cpp @@ -29,7 +29,7 @@ FileAddress::FileAddress(uint64_t inode) noexcept { } FileAddress::FileAddress(const ox::String &path) noexcept { - auto pathSize = path.bytes() + 1; + auto pathSize = path.bytes(); m_data.path = new char[pathSize]; memcpy(m_data.path, path.c_str(), pathSize); m_type = FileAddressType::Path;