aboutsummaryrefslogtreecommitdiff
path: root/xkbcomp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-08-30 15:40:11 +0200
committermarha <marha@users.sourceforge.net>2013-08-30 15:40:11 +0200
commit22bc825e9931f718cc0564aa55915961abaffce4 (patch)
treef53ea31eb5368d3f60860d3e8911fa83a7fd851a /xkbcomp
parentac46cfda36d6dbe8d5c092124a66ffe3f2bad15f (diff)
parent5ebbc3a366287b631775ed3e17537580d380db8a (diff)
downloadvcxsrv-22bc825e9931f718cc0564aa55915961abaffce4.tar.gz
vcxsrv-22bc825e9931f718cc0564aa55915961abaffce4.tar.bz2
vcxsrv-22bc825e9931f718cc0564aa55915961abaffce4.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig mesa xserver xkeyboard-config xkbcomp git update 30 aug 2013
Diffstat (limited to 'xkbcomp')
-rw-r--r--xkbcomp/xkbscan.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/xkbcomp/xkbscan.c b/xkbcomp/xkbscan.c
index 4c3fe3228..221f269b9 100644
--- a/xkbcomp/xkbscan.c
+++ b/xkbcomp/xkbscan.c
@@ -388,9 +388,9 @@ yyGetString(void)
if (i < sizeof(scanBuf) - 1)
scanBuf[i++] = ch;
}
+ scanBuf[i] = '\0';
if (ch == '"')
{
- scanBuf[i++] = '\0';
scanStrLine = lineNum;
return STRING;
}
@@ -401,7 +401,6 @@ static int
yyGetKeyName(void)
{
int ch, i;
- int last;
i = 0;
while (((ch = scanchar()) != EOF) && (ch != '>'))
@@ -463,24 +462,15 @@ yyGetKeyName(void)
else
return ERROR_TOK;
}
-
if (i < sizeof(scanBuf) - 1)
scanBuf[i++] = ch;
}
-
- if (i < sizeof(scanBuf) - i)
- last = i;
- else
- last = sizeof(scanBuf) - 1;
-
- scanBuf[last] = '\0';
-
+ scanBuf[i] = '\0';
if ((ch == '>') && (i < 5))
{
scanStrLine = lineNum;
return KEYNAME;
}
-
return ERROR_TOK;
}