* Fix bug spotted by Rimas Kudelis : if an escaped sequence (such as \xA9) was immediately followed by other digits,
collectcatkeys parsed all the digits instead of just the two associated to the \x, leading to wrong characters in thecatkeys file. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37586 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7235f8680c
commit
e2cc7215e8
@ -161,7 +161,11 @@ parseQuotedChars(BString& stringToParse)
|
||||
*out = '"';
|
||||
else if (*in == 'x') {
|
||||
// Parse the 2-digit hex integer that follows
|
||||
unsigned int hexchar = strtoul(in + 1, NULL, 16);
|
||||
char tmp[3];
|
||||
tmp[0] = *(in+1);
|
||||
tmp[1] = *(in+2);
|
||||
tmp[3] = '\0';
|
||||
unsigned int hexchar = strtoul(tmp, NULL, 16);
|
||||
*out = hexchar;
|
||||
// skip the number
|
||||
in += 2;
|
||||
|
@ -165,7 +165,11 @@ parseQuotedChars(BString& stringToParse)
|
||||
*out = '"';
|
||||
else if (*in == 'x') {
|
||||
// Parse the 2-digit hex integer that follows
|
||||
unsigned int hexchar = strtoul(in + 1, NULL, 16);
|
||||
char tmp[3];
|
||||
tmp[0] = *(in+1);
|
||||
tmp[1] = *(in+2);
|
||||
tmp[3] = '\0';
|
||||
unsigned int hexchar = strtoul(tmp, NULL, 16);
|
||||
*out = hexchar;
|
||||
// skip the number
|
||||
in += 2;
|
||||
|
Loading…
Reference in New Issue
Block a user