Skip to content

Commit 1396aaa

Browse files
committed
use single quote around keymap name
Signed-off-by: Michel-FK <[email protected]>
1 parent 4ad3eb6 commit 1396aaa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

opkrun.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,11 @@ int main(int argc, char **argv)
429429

430430
/* Initialize keymap rom command */
431431
char command[PATH_MAX];
432-
strcpy(command, "keymap rom");
433432
if (rom_arg >= 0) {
434-
strcat(command, " \"");
435-
strncat(command, args[rom_arg], PATH_MAX - 1);
436-
strncat(command, "\"", PATH_MAX - 1);
433+
snprintf(command, PATH_MAX - 1, "keymap rom '%s'",
434+
args[rom_arg]);
435+
} else {
436+
strcpy(command, "keymap rom");
437437
}
438438
printf("Applied keymap rom command: \"%s\"\n", command);
439439
system(command);

0 commit comments

Comments
 (0)