mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
geofence: don't fall over lines containing just a LF
This commit is contained in:
@@ -279,8 +279,14 @@ Geofence::loadFromFile(const char *filename)
|
||||
while((textStart < sizeof(line)/sizeof(char)) && isspace(line[textStart])) textStart++;
|
||||
|
||||
/* if the line starts with #, skip */
|
||||
if (line[textStart] == commentChar)
|
||||
if (line[textStart] == commentChar) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* if there is only a linefeed, skip it */
|
||||
if (line[0] == '\n') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (gotVertical) {
|
||||
/* Parse the line as a geofence point */
|
||||
|
||||
Reference in New Issue
Block a user