1
0
Fork 0

Merging upstream version 4.2+20230304.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-14 06:04:36 +01:00
parent 2bc61998f8
commit 61538669fd
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
4 changed files with 19 additions and 7 deletions

11
util.c
View file

@ -421,14 +421,19 @@ int parse_layout_10(char *layout)
int parse_layout_faulty(char *layout)
{
int ln, mode;
char *m;
if (!layout)
return -1;
/* Parse the layout string for 'faulty' */
int ln = strcspn(layout, "0123456789");
char *m = xstrdup(layout);
int mode;
ln = strcspn(layout, "0123456789");
m = xstrdup(layout);
m[ln] = 0;
mode = map_name(faultylayout, m);
free(m);
if (mode == UnSet)
return -1;