commit
788a3cfc5e
@ -92,7 +92,7 @@ namespace hex {
|
||||
auto endianAdjustedTime = hex::changeEndianess(this->m_previewData.time, this->m_endianess);
|
||||
std::tm * ptm = localtime(&endianAdjustedTime);
|
||||
char buffer[64];
|
||||
if (std::strftime(buffer, 64, "%a, %d.%m.%Y %H:%M:%S", ptm) != 0)
|
||||
if (ptm != nullptr && std::strftime(buffer, 64, "%a, %d.%m.%Y %H:%M:%S", ptm) != 0)
|
||||
this->m_cachedData.emplace_back("time_t", buffer);
|
||||
else
|
||||
this->m_cachedData.emplace_back("time_t", "Invalid");
|
||||
|
@ -137,7 +137,7 @@ namespace hex {
|
||||
|
||||
size_t copySize = (end - start) + 1;
|
||||
|
||||
std::string buffer;
|
||||
std::string buffer(copySize, 0x00);
|
||||
buffer.reserve(copySize + 1);
|
||||
this->m_dataProvider->read(start, buffer.data(), copySize);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user