Skip to content

fix: declare n local in Data.Int.toStringAs#2

Merged
Unisay merged 1 commit into
masterfrom
fix/integers-global-n
Jun 14, 2026
Merged

fix: declare n local in Data.Int.toStringAs#2
Unisay merged 1 commit into
masterfrom
fix/integers-global-n

Conversation

@Unisay

@Unisay Unisay commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Closes #1

Adds the missing local to n in Data.Int.toStringAs, which leaked a global and tripped luacheck (setting non-standard global variable n). Single-line, src-only change; no behaviour change. The remaining luacheck warnings in the file (math.pow, an unused argument) are pre-existing and unrelated, so they are left untouched to keep this fix minimal.

The loop variable `n` in `toStringAs` was assigned without `local`,
leaking a global and tripping luacheck ("setting non-standard global
variable n"). Adding `local` confines it to function scope and clears
the cascade of related warnings. No behaviour change.

Closes #1
@Unisay Unisay merged commit cb9d591 into master Jun 14, 2026
@Unisay Unisay deleted the fix/integers-global-n branch June 14, 2026 11:24
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 this pull request may close these issues.

Data.Int.toStringAs leaks a global n (missing local)

1 participant