]> pilppa.org Git - uci.git/blobdiff - history.c
fix a few bugs found during code review
[uci.git] / history.c
index 052636158ada9cf8d7921553cabab5b2bdef7178..dcf94e02000623c77d1649b5068487e339e6569b 100644 (file)
--- a/history.c
+++ b/history.c
@@ -82,7 +82,7 @@ static void uci_parse_history_line(struct uci_context *ctx, struct uci_package *
                goto error;
        if (option && !uci_validate_name(option))
                goto error;
-       if ((rename || !delete) && !uci_validate_name(value))
+       if ((rename || (!option && !delete)) && !uci_validate_name(value))
                goto error;
 
        if (rename)