[ox/fs] Fix FileAddress(String) to allocate correct amount of memory

This commit is contained in:
Gary Talent 2022-05-18 03:27:45 -05:00
parent 5c5f8e748a
commit 71f6364ea3

View File

@ -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;