dbms: fix Volnitsky correctness for zero-length needle

This commit is contained in:
Andrey Mironov 2015-09-25 18:11:12 +03:00
parent 07a3ea8eb1
commit 8d3783153a

View File

@ -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)