fix by revier comments
This commit is contained in:
Regular → Executable
+2
-6
@@ -80,12 +80,8 @@ class FileReader
|
||||
{
|
||||
if (0 < count)
|
||||
{
|
||||
const auto &ios =
|
||||
input_stream.getline(reinterpret_cast<char *>(dest), count * sizeof(T));
|
||||
for (std::size_t n = ios.gcount(); n < count; ++n)
|
||||
{
|
||||
reinterpret_cast<char *>(dest)[n] = '\0';
|
||||
}
|
||||
memset(dest, 0, count * sizeof(T));
|
||||
input_stream.getline(reinterpret_cast<char *>(dest), count * sizeof(T));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user