aboutsummaryrefslogtreecommitdiffstats
path: root/main/kbd/kbd-1.15.3-loadkeys-d.patch
blob: 73bb7c47fe97ef6a66de00a2a0b231f639869e66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff -up kbd-1.15.3/src/loadkeys.c.orig kbd-1.15.3/src/loadkeys.c
--- kbd-1.15.3/src/loadkeys.c.orig	2011-10-24 13:44:52.222401546 +0200
+++ kbd-1.15.3/src/loadkeys.c	2011-10-24 13:47:52.413389029 +0200
@@ -2958,7 +2958,7 @@ int main(int argc, char *argv[])
 		close(fd);
 	}
 
-	for (i = optind; argv[i]; i++) {
+	for (i = optind; argv[i] || optd; i++) {
 		FILE *f;
 		char *ev;
 
@@ -2974,6 +2974,7 @@ int main(int argc, char *argv[])
 		if (optd) {
 			/* first read default map - search starts in . */
 			optd = 0;
+			i--;
 			if ((f = findfile(DEFMAP, dirpath, suffixes)) == NULL) {
 				fprintf(stderr, _("Cannot find %s\n"), DEFMAP);
 				exit(EXIT_FAILURE);