mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
treat hsecsincemidn as a signed integer
This commit is contained in:
@@ -148,7 +148,12 @@ bool readSrmFile(QFile &file, SrmData &data, QStringList &errorStrings)
|
||||
|
||||
blockhdr *blockhdrs = new blockhdr[blockcnt];
|
||||
for (int i = 0; i < blockcnt; ++i) {
|
||||
quint32 hsecsincemidn = readLong(in);
|
||||
// In the .srm files generated by Rainer Clasen's srmcmd,
|
||||
// hsecsincemidn is a *signed* 32-bit integer. I haven't seen a
|
||||
// negative value in any .srm files generated by srmwin.exe, but
|
||||
// since the number of hundredths of a second in a day is << 2^31,
|
||||
// it seems safe to always treat this number as signed.
|
||||
qint32 hsecsincemidn = readLong(in);
|
||||
blockhdrs[i].chunkcnt = readShort(in);
|
||||
blockhdrs[i].dt = QDateTime(date);
|
||||
blockhdrs[i].dt = blockhdrs[i].dt.addMSecs(hsecsincemidn * 10);
|
||||
|
||||
Reference in New Issue
Block a user