do not load wko files with zero records

Includes a test wko file that previously caused a crash.
This commit is contained in:
Berend De Schouwer
2009-09-25 14:19:07 +02:00
committed by Sean Rhea
parent 6406973cc0
commit f3cb9c6fab
2 changed files with 1 additions and 0 deletions

View File

@@ -207,6 +207,7 @@ WKO_UCHAR *WkoParseRawData(WKO_UCHAR *fb, RideFile *rideFile)
* RUN THROUGH EACH RAW DATA RECORD
*==============================================================================*/
rdist=rtime=0;
if (!records) return NULL;
while (records) {
unsigned int marker;

Binary file not shown.