mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Allow IGC files with an A header of size 6
This commit is contained in:
parent
e2f2e9700f
commit
441c738d0f
@ -87,10 +87,12 @@ static bool readTimestamp(const char *data, QTime &time)
|
|||||||
|
|
||||||
static bool readARecord(const char *line, qint64 len)
|
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;
|
return false;
|
||||||
|
|
||||||
for (int i = 1; i < 7; i++)
|
for (int i = 1; i < 6; i++)
|
||||||
if (!::isprint(line[i]))
|
if (!::isprint(line[i]))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user