Skip to content

Commit

Permalink
libgis parser: an empty string is not an answer (#958)
Browse files Browse the repository at this point in the history
skip zero length answers
  • Loading branch information
metzm committed Sep 19, 2020
1 parent 400c597 commit b339724
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/gis/parser.c
Expand Up @@ -1089,6 +1089,10 @@ void set_option(const char *string)
*ptr = '\0';
string++;

/* an empty string is not a valid answer, skip */
if (! *string)
return;

/* Find option with best keyword match */
key_len = strlen(the_key);
for (at_opt = &st->first_option; at_opt; at_opt = at_opt->next_opt) {
Expand Down

0 comments on commit b339724

Please sign in to comment.