Skip to content

nle: avoid hackdir underflow on empty path#96

Closed
j-lojek wants to merge 1 commit intoNetHack-LE:mainfrom
j-lojek:fix/pr7-empty-hackdir-guard
Closed

nle: avoid hackdir underflow on empty path#96
j-lojek wants to merge 1 commit intoNetHack-LE:mainfrom
j-lojek:fix/pr7-empty-hackdir-guard

Conversation

@j-lojek
Copy link

@j-lojek j-lojek commented Feb 20, 2026

Summary

  • guard len == 0 before accessing settings.hackdir[len - 1]
  • keep existing normalization logic (.../) for non-empty paths
  • fail fast with clear error when HACKDIR is empty

Bugs fixed

  • S1: hackdir underflow in mainloop

Validation

  • static code validation of the underflow path and normalization flow
  • full build/test validation is blocked on GCC15 compatibility issue tracked in PR 10

@j-lojek j-lojek closed this Feb 20, 2026
@j-lojek j-lojek deleted the fix/pr7-empty-hackdir-guard branch February 20, 2026 18:38
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.

1 participant