kbd/kbd-1.15.3-loadkeys-d.patch
2011-10-24 13:59:45 +02:00

21 lines
669 B
Diff

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);