Merge pull request #142 from dirtbags/foundry16-hotfix

Support insta-checking for legacy puzzles
This commit is contained in:
int00h5525 2020-03-16 11:37:23 -05:00 committed by GitHub
commit f6d1dc741c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [v3.5.1] - 2020-03-16
### Fixed
- Support insta-checking for legacy puzzles
## [v3.5.0] - 2020-03-13 ## [v3.5.0] - 2020-03-13
### Changed ### Changed
- We are now using SHA256 instead of djb2hash - We are now using SHA256 instead of djb2hash

View File

@ -1 +1 @@
3.5.0 3.5.1

View File

@ -84,11 +84,11 @@ async function possiblyCorrect(answer) {
return answer return answer
} }
for (let end = 0; end <= answer.length; end += 1) { for (let end = 0; end <= answer.length; end += 1) {
if (window.puzzle.xAnchors.includes("end") && (end != answer.length)) { if (window.puzzle.xAnchors && window.puzzle.xAnchors.includes("end") && (end != answer.length)) {
continue continue
} }
for (let beg = 0; beg < answer.length; beg += 1) { for (let beg = 0; beg < answer.length; beg += 1) {
if (window.puzzle.xAnchors.includes("begin") && (beg != 0)) { if (window.puzzle.xAnchors && window.puzzle.xAnchors.includes("begin") && (beg != 0)) {
continue continue
} }
let sub = answer.substring(beg, end) let sub = answer.substring(beg, end)
@ -266,4 +266,3 @@ if (document.readyState === "loading") {
} else { } else {
init() init()
} }