geofence: don't fall over lines containing just a LF

This commit is contained in:
Ban Siesta 2014-12-21 14:09:04 +00:00
parent 1910b7e88b
commit b1f462a266
1 changed files with 7 additions and 1 deletions

View File

@ -279,8 +279,14 @@ Geofence::loadFromFile(const char *filename)
while((textStart < sizeof(line)/sizeof(char)) && isspace(line[textStart])) textStart++; while((textStart < sizeof(line)/sizeof(char)) && isspace(line[textStart])) textStart++;
/* if the line starts with #, skip */ /* if the line starts with #, skip */
if (line[textStart] == commentChar) if (line[textStart] == commentChar) {
continue; continue;
}
/* if there is only a linefeed, skip it */
if (line[0] == '\n') {
continue;
}
if (gotVertical) { if (gotVertical) {
/* Parse the line as a geofence point */ /* Parse the line as a geofence point */