diff options
author | marha <marha@users.sourceforge.net> | 2013-07-19 08:30:15 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-07-19 08:30:15 +0200 |
commit | 89bc3ee988b62eb5e10284bac32a176955546410 (patch) | |
tree | 186769abb7a48a7b04463706dee116795e07485f /xkbcomp | |
parent | f5e157731e6b51421ac89cfefb666b8bbf971b03 (diff) | |
download | vcxsrv-89bc3ee988b62eb5e10284bac32a176955546410.tar.gz vcxsrv-89bc3ee988b62eb5e10284bac32a176955546410.tar.bz2 vcxsrv-89bc3ee988b62eb5e10284bac32a176955546410.zip |
mesa xkbcomp git update 19 Jul 2013
xkbcomp commit 0ebdf47fd4bc434ac3d2339544c022a869510738
esa commit 9f07ca11c1797ac12de1e1c6aef13cf58824b5f5
Diffstat (limited to 'xkbcomp')
-rw-r--r-- | xkbcomp/xkbcomp.c | 4 | ||||
-rw-r--r-- | xkbcomp/xkbscan.c | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/xkbcomp/xkbcomp.c b/xkbcomp/xkbcomp.c index 440d542ff..fb5dec2fc 100644 --- a/xkbcomp/xkbcomp.c +++ b/xkbcomp/xkbcomp.c @@ -579,8 +579,8 @@ parseArgs(int argc, char *argv[]) if ((i >= (argc - 1)) || (!isdigit(argv[i + 1][0]))) { warningLevel = 0; - if (isdigit(argv[i][1])) - if (sscanf(&argv[i][1], "%i", &itmp) == 1) + if (isdigit(argv[i][2])) + if (sscanf(&argv[i][2], "%i", &itmp) == 1) warningLevel = itmp; } else diff --git a/xkbcomp/xkbscan.c b/xkbcomp/xkbscan.c index 7b91b4533..144f315dd 100644 --- a/xkbcomp/xkbscan.c +++ b/xkbcomp/xkbscan.c @@ -401,6 +401,7 @@ static int yyGetKeyName(void) { int ch, i; + int last; i = 0; while (((ch = scanchar()) != EOF) && (ch != '>')) @@ -466,12 +467,20 @@ yyGetKeyName(void) if (i < sizeof(scanBuf) - 1) scanBuf[i++] = ch; } + + if (i < sizeof(scanBuf) - i) + last = i; + else + last = sizeof(scanBuf) - 1; + + scanBuf[last] = '\0'; + if ((ch == '>') && (i < 5)) { - scanBuf[i++] = '\0'; scanStrLine = lineNum; return KEYNAME; } + return ERROR_TOK; } |