[ox/fs] Fix FileAddress(String) to allocate correct amount of memory
This commit is contained in:
parent
5c5f8e748a
commit
71f6364ea3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user