We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d72bc27 commit de09caaCopy full SHA for de09caa
1 file changed
py/makeqstrdata.py
@@ -27,7 +27,8 @@ def compute_hash(qstr):
27
hash = 5381
28
for char in qstr:
29
hash = (hash * 33) ^ ord(char)
30
- return hash & 0xffff
+ # Make sure that valid hash is never zero, zero means "hash not computed"
31
+ return (hash & 0xffff) or 1
32
33
def do_work(infiles):
34
# read the qstrs in from the input files
0 commit comments