Branch: Tag:


2013-02-12 18:04:13 by Henrik Grubbström (Grubba) <>

Fixed bug in hubbe_search() on wide strings.

The last character for 16-bit wide and last three characters
for 32-bit wide haystack strings was missed.

This bug was probably hard to trigger in practice, since
the hubbe_search() method is only used for needles longer
than 34 characters and satisfying some other more obscure
criteria, and to be triggered also requires a haystack of
a specific length compared to the needle.

174:       NameH(HUBBE_ALIGN)(q);    -  for(;q<=end-sizeof(INT32);q+=max) +  for(;q<=(HCHAR*)(((char *)end)-sizeof(INT32));q+=max)    {    h=tmp=NameH(GET_4_ALIGNED_CHARS)(q);