bfs: Query parser needs to filter out escape char.
* When escaping operator/quote characters, the character was properly ignored. However, the escape char was left in the string which altered the query. * This fixes bug #10976.
This commit is contained in:
@@ -757,7 +757,16 @@ Equation::_CopyString(char* start, char* end)
|
|||||||
if (copy == NULL)
|
if (copy == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
memcpy(copy, start, length - 1);
|
// Filter out remaining escaping slashes
|
||||||
|
for (int32 i = 0; i < length; i++) {
|
||||||
|
char c = start++[0];
|
||||||
|
if (c == '\\' && i < length) {
|
||||||
|
length--;
|
||||||
|
i--;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
copy[i] = c;
|
||||||
|
}
|
||||||
copy[length - 1] = '\0';
|
copy[length - 1] = '\0';
|
||||||
|
|
||||||
return copy;
|
return copy;
|
||||||
|
|||||||
Reference in New Issue
Block a user