EON Steel: empty descriptor lines are ok

Suunto's new v1.1.15 firmware ends up terminating some final descriptor
lines with a newline, rather than just using newlines as separators.  So
the last newline may not be followed by further data, but simple be the
end of the string.  Accept that case.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2015-06-06 17:14:25 -07:00 committed by Jef Driesen
parent bdae428639
commit a701cc9309

View File

@ -79,6 +79,8 @@ static int record_type(suunto_eonsteel_parser_t *eon, unsigned short type, const
next++;
} else {
len = strlen(name);
if (!len)
break;
}
if (len < 5 || name[0] != '<' || name[4] != '>') {