Skip to content

Fix for wirelink:readArray() - #3741

Merged
Astralcircle merged 1 commit into
wiremod:masterfrom
Astralcircle:readarray
Oct 19, 2026
Merged

Astralcircle merged 1 commit into
wiremod:masterfrom
Astralcircle:readarray

Conversation

@Astralcircle

Copy link
Copy Markdown
Member

No description provided.

@Astralcircle
Astralcircle merged commit b219274 into wiremod:master Oct 19, 2026
1 check failed
@Astralcircle
Astralcircle deleted the readarray branch October 19, 2026 20:33
@thegrb93

Copy link
Copy Markdown
Contributor

NaN check isnt needed since comparator returns false. Idk if the perf check is or not needed tho

@Astralcircle

Copy link
Copy Markdown
Member Author

NaN check isnt needed since comparator returns false. Idk if the perf check is or not needed tho

NaN can corrupt self.prf making it NaN
If you set size to _INF, the loop will become infinite and will never reach quota check

@thegrb93

Copy link
Copy Markdown
Contributor

size < 0 will be false if NaN is given. _INF can still make it past this check.

@Astralcircle

Copy link
Copy Markdown
Member Author

size < 0 will be false if NaN is given

That is precisely why we also need the check size ~= size, isn't it?

@thegrb93

Copy link
Copy Markdown
Contributor

Oh ya it's an early return. My b

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.

3 participants