diff options
author | Matt <ukyg9e5r6k7gubiekd6@yahoo.com> | 2015-01-23 19:25:00 +1100 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-01-23 04:51:52 -0500 |
commit | 8ad7639727312ec64d989bb911babe8ae01f469d (patch) | |
tree | badd69231fa11b27b43d04492d6e5b375130e888 /timebase.c | |
parent | 78c5fe3fe60be3645e080ff14c5c843c811c82da (diff) | |
download | gpsd-8ad7639727312ec64d989bb911babe8ae01f469d.tar.gz |
Move pointer the correct direction when trying to skip spaces
gpsd_set_century attempts to skip optional whitespace in its input, but
it does so by decrementing its pointer, when it should instead be
incrementing it.
Eric, I feel this one should make the snap release. It's trivial,
isolated from other code, and I hope is "obviously correct".
I have further patches in my queue, which I'm sending shortly, but which
I don't think should necessarily go in the current snap release. None of
them is critical.
Diffstat (limited to 'timebase.c')
-rw-r--r-- | timebase.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -255,7 +255,7 @@ void gpsd_set_century(struct gps_device_t *session) int year; unsigned char *cp = session->lexer.outbuffer + 5; while (isspace(*cp)) - --cp; + ++cp; year = (int)strtol((char *)cp, &end, 10); session->context->century = year - (year % 100); } |