Lachee / Lachee/fivem-busdriver
table remove inside for loop
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 19
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
hello, first of all excellent resource.
I wanted to point out these 2 reported functions which probably does not work as intended,
you are using the table.remove inside a loop, but table.remove cause the elements in the table to be shifted immediately after deletion, so you are not looping every element in the table but skipping 1 after every remove.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in client/entities/Bus.lua at lines 135-180 and inspect the two functions that call table.remove inside a loop. Verify how deletion affects iteration and confirm that the intended entries are all processed without being skipped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100