Pārlūkot izejas kodu

Don't ignore an empty answer when splitting options.
Fixes the command history for e.g., v.edit where="". Without this fix, where="" is not included, which makes an invalid command.


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68057 15284696-431f-4ddb-bdfa-cd5b030d7da7

Huidae Cho 9 gadi atpakaļ
vecāks
revīzija
f973863600
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      lib/gis/parser.c

+ 1 - 1
lib/gis/parser.c

@@ -1416,7 +1416,7 @@ void split_opts(void)
 		for (len = 0, ptr2 = ptr1; *ptr2 != '\0' && *ptr2 != ',';
 		     ptr2++, len++) ;
 
-		if (len > 0) {	/* skip ,, */
+		if (ptr2 == opt->answer || len > 0) {	/* answer = "" or skip ,, */
 		    opt->answers[ans_num] = G_malloc(len + 1);
 		    memcpy(opt->answers[ans_num], ptr1, len);
 		    opt->answers[ans_num][len] = 0;