Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bad index in removevalues #571

Merged
merged 3 commits into from
Nov 6, 2024
Merged

Commits on Nov 6, 2024

  1. Fix bad index in removevalues

    When the table.remove call from split into its own reverse iterating loop, the table.remove call was still using the `k` variable from the old loop rather than the new `i` index.
    billfreist authored Nov 6, 2024
    Configuration menu
    Copy the full SHA
    53465a8 View commit details
    Browse the repository at this point in the history
  2. The for loop in removevalues should also break

    To match previous behavior, which was correct, the reverse iteration should also `break` so it doesn't needlessly try to match the entry that shifted into that index. No behavior change, as that entry would have already been checked and not matched.
    
    If the table only has one entry that is removed, this code would be indexing an empty table.
    billfreist authored Nov 6, 2024
    Configuration menu
    Copy the full SHA
    79a2f95 View commit details
    Browse the repository at this point in the history
  3. Embed scripts into scripts.c

    Run embed to inject fixes to removevalues
    billfreist authored Nov 6, 2024
    Configuration menu
    Copy the full SHA
    31fe794 View commit details
    Browse the repository at this point in the history