Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening a newly created .puz file in Across Lite causes a crash #12

Open
Q726kbXuN opened this issue Feb 23, 2024 · 0 comments · May be fixed by #13
Open

Opening a newly created .puz file in Across Lite causes a crash #12

Q726kbXuN opened this issue Feb 23, 2024 · 0 comments · May be fixed by #13

Comments

@Q726kbXuN
Copy link

The following simple code to create a .puz file creates a file that causes recent versions of Across Lite to crash.

const puz = require("./dist")
const fs = require('fs');

const puzzle = {
    "width": 2,
    "height": 2,
    "solution": "ABCD",
    "clues": [
        "Clue: AB",
        "Clue: AC",
        "Clue: BD",
        "Clue: CD",
    ]
}

const data = puz.printBinaryFile(puzzle);

fs.writeFileSync('example-output.puz', data);

Attempting to open example-output.puz will result in a crash on Across Lite v2.5 on both the Mac and Windows.

This is because the puzzle format flag (called "unknown3" in code) is being set to "0x0000". Across lite requires 0x0001 for normal crossword puzzles.

@Q726kbXuN Q726kbXuN linked a pull request Feb 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant