mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 08:59:55 +00:00
FIT File Read - Exception not catched
... exception "Truncated" for the "final" read call of the FIT file reader was not catched, causing termination of the program (problem reported with an example file being truncated at the end)
This commit is contained in:
@@ -1008,8 +1008,14 @@ struct FitFileReaderState
|
||||
}
|
||||
else {
|
||||
if (!truncated) {
|
||||
int crc = read_uint16( false ); // always littleEndian
|
||||
(void) crc;
|
||||
try {
|
||||
int crc = read_uint16( false ); // always littleEndian
|
||||
(void) crc;
|
||||
}
|
||||
catch (TruncatedRead &e) {
|
||||
errors << "truncated file body";
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
foreach(int num, unknown_global_msg_nums)
|
||||
|
||||
Reference in New Issue
Block a user