mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Trim waypoint names on the first nul char
This commit is contained in:
parent
9ae484e811
commit
3ac197907b
@ -217,7 +217,7 @@ bool FITParser::readField(CTX &ctx, const Field *field, QVariant &val,
|
|||||||
{QByteArray ba(ctx.file->read(field->size));
|
{QByteArray ba(ctx.file->read(field->size));
|
||||||
ctx.len -= field->size;
|
ctx.len -= field->size;
|
||||||
ret = (ba.size() == 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);}
|
valid = (!ba.isEmpty() && ba.at(0) != 0);}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user