1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-23 19:25:54 +01:00

Trim waypoint names on the first nul char

This commit is contained in:
Martin Tůma 2024-09-02 09:55:35 +02:00
parent 9ae484e811
commit 3ac197907b

View File

@ -217,7 +217,7 @@ bool FITParser::readField(CTX &ctx, const Field *field, QVariant &val,
{QByteArray ba(ctx.file->read(field->size));
ctx.len -= field->size;
ret = (ba.size() == field->size);
val = ret ? ba : QString();
val = ret ? QString(ba.left(ba.indexOf('\0'))) : QString();
valid = (!ba.isEmpty() && ba.at(0) != 0);}
break;
default: