Skip to content

ds N, causes a division by zero error #2259

In review

Description

@Rangi42

Follow-up to #2257. The implementation in #2258 treats ds N, (with a trailing comma) as a data ds with zero elements, which divides by zero when N is nonzero. It should instead treat ds N, the same way as ds N (without a trailing comma), i.e. as a padding ds without any data.

Note that the current bad-ds.asm test case does try to test ds 2,, but since it's in WRAM, the requireCodeSection()'s "Section ... cannot contain code or data" error happens before the division by zero can occur.

This will also need fixing in the Rust rewrite.

Activity

  1. added this to the 1.0.5 milestone on Nov 29, 2026
  2. self-assigned this
    on Nov 29, 2026
  3. added
    bug
    rgbasm
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugrgbasm

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions