1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-27 21:24:47 +01:00

Allow IGC files with an A header of size 6

This commit is contained in:
Martin Tůma 2020-03-24 22:06:03 +01:00
parent e2f2e9700f
commit 441c738d0f

View File

@ -87,10 +87,12 @@ static bool readTimestamp(const char *data, QTime &time)
static bool readARecord(const char *line, qint64 len)
{
if (len < 7 || line[0] != 'A')
/* The minimal A record length should be 7 according to the specification,
but records with length of 6 exist in the wild */
if (len < 6 || line[0] != 'A')
return false;
for (int i = 1; i < 7; i++)
for (int i = 1; i < 6; i++)
if (!::isprint(line[i]))
return false;
return true;