]> git.ozlabs.org Git - petitboot/blobdiff - ui/ncurses/nc-ked.c
Add UI option --dry-run
[petitboot] / ui / ncurses / nc-ked.c
index c326f911da1826521cb0296098b8ed03f53ace46..806d3895767348a72d9620befcf2854bce1a2b96 100644 (file)
@@ -149,9 +149,10 @@ static char *ked_chomp(char *s)
        for (; s < s_end; s++)
                if (*s != ' ' && *s != '\t')
                        break;
        for (; s < s_end; s++)
                if (*s != ' ' && *s != '\t')
                        break;
-       start = s;
 
 
-       for (++s; s < s_end; s++)
+       start = end = s;
+
+       for (; s < s_end; s++)
                if (*s != ' ' && *s != '\t')
                        end = s;
        *(end + 1) = 0;
                if (*s != ' ' && *s != '\t')
                        end = s;
        *(end + 1) = 0;