Properly fail to parse lines of two or one chars
authorMilian Wolff <mail@milianw.de>
Sun, 2 Apr 2017 18:54:34 +0000 (20:54 +0200)
committerMilian Wolff <mail@milianw.de>
Sun, 2 Apr 2017 18:57:34 +0000 (20:57 +0200)
commitccdc14bfaa433f639ab61765a0d106f721cafc50
treeb283ee3268f6d407d545b402bbe1026127d4aa22
parentaecd0c2d6162ea4e9ca3c4164e86ff7b251968c8
Properly fail to parse lines of two or one chars

When we encountered e.g. a line with the contents 'c ', we did
not advance the char iterator to the end of the string and kept
it instead at the beginning of the line. Then, when we tried to
parse the timestamp, we would interpret the 'c' as 0xc == 12.
This then lead to breakage when we try to compute the chart model:
There, we would improperly use 12 as the maximum timestamp and
then essentially drop our time filter, instead trying to visualize
all charts and with wrong timestamps too.

This patch fixes this issue, we now fail to parse the 'c ' line
and thus simply omit the last timestamp and do not get confused
when building the chart model data.
src/util/linereader.h