[ox/fs] Fix FileAddress paths initialized from StringView to null terminate
This commit is contained in:
		@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user