mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 09:10:48 +00:00
dbms: fix Volnitsky correctness for zero-length needle
This commit is contained in:
parent
07a3ea8eb1
commit
8d3783153a
@ -89,6 +89,9 @@ public:
|
||||
/// Если не найдено - возвращается конец haystack.
|
||||
const char * search(const char * haystack, size_t haystack_size) const
|
||||
{
|
||||
if (needle_size == 0)
|
||||
return haystack;
|
||||
|
||||
const char * haystack_end = haystack + haystack_size;
|
||||
|
||||
if (needle_size == 1)
|
||||
|
Loading…
Reference in New Issue
Block a user