fix error in utilStringHashCode

This commit is contained in:
siikamiika 2017-10-19 00:47:08 +03:00
parent 7e556e8d32
commit 9d4b75de20
2 changed files with 2 additions and 2 deletions

View File

@ -269,7 +269,7 @@ function optionsVersion(options) {
}
options.general.compactTags = false;
options.general.compactGlossaries = false;
if (utilStringHashCode(options.anki.fieldTemplates) !== -1895236672) { // a3c8508031a1073629803d0616a2ee416cd3cccc
if (utilStringHashCode(options.anki.fieldTemplates) !== -805327496) { // a3c8508031a1073629803d0616a2ee416cd3cccc
options.anki.fieldTemplates = '{{#if merge}}\n' +
optionsFieldTemplates() +
'\n{{else}}\n' +

View File

@ -59,7 +59,7 @@ function utilStringHashCode(string) {
return hashCode;
}
for (let i = 0, charCode = string.charCodeAt(i); i < string.length; i++) {
for (let i = 0, charCode = string.charCodeAt(i); i < string.length; charCode = string.charCodeAt(++i)) {
hashCode = ((hashCode << 5) - hashCode) + charCode;
hashCode |= 0;
}