Skip to content

Empty output file created when assembling new ROM fails #396

@e-l-i-j-a-h

Description

@e-l-i-j-a-h

Asar appears to leave an empty output file if assembling a ROM from scratch fails. Build tools such as Make (by default, with .DELETE_ON_ERROR not present) may incorrectly assume the file was built successfully with this behavior.

I have tested this on Windows with both the latest commit on the 2.0 branch (9757f2f) and 1.91 at the time of opening this issue.

main.asm:

; test file

org $808000
db $20
asdfjkl ; error
db $40

2.0 console output:

$ rm rom.sfc
$ asar main.asm rom.sfc
main.asm:5: error: (Eunknown_command): Unknown command.
    in block: [asdfjkl]
Errors were detected while assembling the patch. Assembling aborted. Your ROM has not been modified.
$ ls
main.asm rom.sfc
$ xxd rom.sfc

1.91 console output:

$ rm rom.sfc
$ C:/path_to_asar191/asar.exe main.asm rom.sfc
main.asm:5: error: (Eunknown_command): Unknown command. [asdfjkl]
Errors were detected while assembling the patch. Assembling aborted. Your ROM has not been modified.
$ ls
main.asm rom.sfc
$ xxd rom.sfc

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions