fix an off-by one, spotted by chance
This commit is contained in:
parent
fa6ba76f85
commit
d2309f003d
1 changed files with 2 additions and 2 deletions
|
|
@ -112,9 +112,9 @@ namespace lib {
|
|||
size_t hash=0;
|
||||
if (literal)
|
||||
{
|
||||
size_t cnt = 1;
|
||||
const char *pos = literal;
|
||||
size_t maxpos = STRING_MAX_RELEVANT;
|
||||
for ( ; *pos && --maxpos; ++pos)
|
||||
for ( ; cnt <= STRING_MAX_RELEVANT and *pos ; ++cnt, ++pos )
|
||||
hash_combine(hash, *pos);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue