Commit Diff


commit - 9bdde78d5a25b7c7ea4b20c3329fd368c0751709
commit + 0b080a2247e7f3c9d6f94023807565c7b84df88b
blob - 0dc92dac58e59ec9fb01a7e0e79966ded6640949
blob + 5e43d44f4b4d589f49bc97b33f10ba5855870919
--- commands.c
+++ commands.c
@@ -3049,8 +3049,10 @@ cmdrc(char rcname[FILENAME_MAX])
 			break;
 		if (line[0] == '#')
 			continue;
-		if (line[0] == '!')
+		if (line[0] == '!') {
+			savec = NULL;
 			continue;
+		}
 		/*
 		 * Don't ignore indented comments with pound sign, otherwise
 		 * comments won't be saved into daemon/ctl config files.
@@ -3060,7 +3062,7 @@ cmdrc(char rcname[FILENAME_MAX])
 		if (line[0] == ' ')
 			strlcpy(saveline, line, sizeof(saveline));
 		makeargv();
-		if (margv[0] == 0)
+		if (margv[0] == 0 && !savec)
 			continue;
 		if (line[0] == ' ' && (!savec || savec->modh < 1)) {
 			printf("%% No mode handler specified before"