read properties stream to size of properties object, not 1
This commit is contained in:
committed by
Huyen Chau Nguyen
parent
51ebadfc45
commit
c4f010e363
@@ -124,7 +124,7 @@ class InternalDataFacade final : public BaseDataFacade
|
||||
throw util::exception("Could not open " + properties_path.string() + " for reading.");
|
||||
}
|
||||
auto PropertiesSize = storage::io::readPropertiesSize();
|
||||
storage::io::readProperties(in_stream, reinterpret_cast<char *>(&m_profile_properties), PropertiesSize);
|
||||
storage::io::readProperties(in_stream, &m_profile_properties, PropertiesSize);
|
||||
}
|
||||
|
||||
void LoadLaneTupleIdPairs(const boost::filesystem::path &lane_data_path)
|
||||
|
||||
@@ -19,10 +19,10 @@ inline std::size_t readPropertiesSize() { return 1; }
|
||||
|
||||
template <typename PropertiesT>
|
||||
inline void readProperties(boost::filesystem::ifstream &properties_stream,
|
||||
PropertiesT properties[],
|
||||
std::size_t PropertiesSize)
|
||||
PropertiesT *properties,
|
||||
std::size_t properties_size)
|
||||
{
|
||||
properties_stream.read(properties, PropertiesSize);
|
||||
properties_stream.read(reinterpret_cast<char *>(properties), properties_size);
|
||||
}
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
Reference in New Issue
Block a user