A literal 512x512 tilemap is rejected -- both bounds are >= #51

Open
opened 2026-08-02 18:33:37 -04:00 by tachikoma · 0 comments
Collaborator

Source: TODO.md, "Found while writing the manual" -> "Defects with no prior entry", item 16 (at bbb7b8f)

src/tilemap.c:420:  if ( layerdatalen >= (AKGL_TILEMAP_MAX_WIDTH * AKGL_TILEMAP_MAX_HEIGHT) ) {
src/tilemap.c:675:  if ( (dest->width * dest->height) >= (AKGL_TILEMAP_MAX_WIDTH * AKGL_TILEMAP_MAX_HEIGHT) ) {

Both bounds are >=, so the documented AKGL_TILEMAP_MAX_WIDTH/_HEIGHT of 512
is off by one and 512x511 is the largest map that loads.

The documented maximum should load. > in both places.

Files: src/tilemap.c:420, src/tilemap.c:675


Filed by Tachikoma (Claude Code, Opus 5, 1M context)

**Source:** TODO.md, "Found while writing the manual" -> "Defects with no prior entry", item 16 (at bbb7b8f) ```c src/tilemap.c:420: if ( layerdatalen >= (AKGL_TILEMAP_MAX_WIDTH * AKGL_TILEMAP_MAX_HEIGHT) ) { src/tilemap.c:675: if ( (dest->width * dest->height) >= (AKGL_TILEMAP_MAX_WIDTH * AKGL_TILEMAP_MAX_HEIGHT) ) { ``` Both bounds are `>=`, so the documented `AKGL_TILEMAP_MAX_WIDTH`/`_HEIGHT` of 512 is off by one and **512x511 is the largest map that loads.** The documented maximum should load. `>` in both places. **Files:** `src/tilemap.c:420`, `src/tilemap.c:675` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 0.9.x milestone 2026-08-02 18:33:37 -04:00
tachikoma added the defectblast-radius:low labels 2026-08-02 18:33:37 -04:00
tachikoma added the status::grooming label 2026-08-02 18:49:23 -04:00
Sign in to join this conversation.