Commit 1263c353 authored by Morten Ofstad's avatar Morten Ofstad
Browse files

Call strtoull instead of strtol when deserializing persistentID so we don't...

Call strtoull instead of strtol when deserializing persistentID so we don't overflow and always get 7FFFFFFF.
parent 35f465c0
......@@ -298,7 +298,7 @@ parseSEGYFileInfoFile(OpenVDS::File const &file, SEGYFileInfo &fileInfo)
throw Json::Exception(errs);
}
fileInfo.m_persistentID = strtol(jsonFileInfo["persistentID"].asCString(), nullptr, 16);
fileInfo.m_persistentID = strtoull(jsonFileInfo["persistentID"].asCString(), nullptr, 16);
fileInfo.m_headerEndianness = endiannessFromJson(jsonFileInfo["headerEndianness"]);
fileInfo.m_dataSampleFormatCode = SEGY::BinaryHeader::DataSampleFormatCode(jsonFileInfo["dataSampleFormatCode"].asInt());
fileInfo.m_sampleCount = jsonFileInfo["sampleCount"].asInt();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment