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:
Axel Dörfler 2017-01-19 21:36:13 +01:00
parent a2eb6bbda4
commit f79179975d
1 changed files with 10 additions and 1 deletions

View File

@ -757,7 +757,16 @@ Equation::_CopyString(char* start, char* end)
if (copy == 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';
return copy;