mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 21:28:04 +02:00
When makekeys fails to find a good hash, print error instead of divide-by-zero
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
This commit is contained in:
parent
c9f84af591
commit
78a894231a
1 changed files with 10 additions and 0 deletions
|
|
@ -154,6 +154,11 @@ next1: ;
|
|||
}
|
||||
|
||||
z = best_z;
|
||||
if (z == 0) {
|
||||
fprintf(stderr, "makekeys: failed to find small enough hash!\n"
|
||||
"Try increasing KTNUM in makekeys.c\n");
|
||||
exit(1);
|
||||
}
|
||||
printf("#ifdef NEEDKTABLE\n");
|
||||
printf("const unsigned char _XkeyTable[] = {\n");
|
||||
printf("0,\n");
|
||||
|
|
@ -234,6 +239,11 @@ next2: ;
|
|||
}
|
||||
|
||||
z = best_z;
|
||||
if (z == 0) {
|
||||
fprintf(stderr, "makekeys: failed to find small enough hash!\n"
|
||||
"Try increasing KTNUM in makekeys.c\n");
|
||||
exit(1);
|
||||
}
|
||||
for (i = z; --i >= 0;)
|
||||
offsets[i] = 0;
|
||||
for (i = 0; i < ksnum; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue