diff options
| author | siikamiika <siikamiika@users.noreply.github.com> | 2017-10-19 00:47:08 +0300 | 
|---|---|---|
| committer | siikamiika <siikamiika@users.noreply.github.com> | 2017-10-19 00:47:08 +0300 | 
| commit | 9d4b75de20d4a734d3f260498cb50b4e20ae8310 (patch) | |
| tree | 71219a4832b0a865d00cd80c02140a520d5984e7 | |
| parent | 7e556e8d32251844723d665cec54a9a69ad94e76 (diff) | |
fix error in utilStringHashCode
| -rw-r--r-- | ext/bg/js/options.js | 2 | ||||
| -rw-r--r-- | ext/bg/js/util.js | 2 | 
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;      } |