aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/options.js2
-rw-r--r--ext/bg/js/util.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 00981096..5902bc30 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -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' +
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index 88d96688..91b16e79 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -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;
}