Skip to content

Fix loading empty no-cache client scripts - #5499

Merged
FileEX merged 1 commit into
multitheftauto:masterfrom
MohabCodeX:fix/no-cache-empty-script-loading
Oct 7, 2026
Merged

FileEX merged 1 commit into
multitheftauto:masterfrom
MohabCodeX:fix/no-cache-empty-script-loading

Conversation

@MohabCodeX

Copy link
Copy Markdown
Contributor

Fixes #5498

Description

This addresses a regression introduced during recent packet validation hardening (#5037). While adding bounds checking against oversized script chunks, zero-length scripts were inadvertently treated as invalid packet data and rejected, aborting the packet processing early and preventing the resource from loading the rest of its client scripts.

This change allows empty (0-byte) scripts to pass through and load normally as valid blank chunks, while keeping the 50 MB upper size limit and packet validation intact.

Test plan

Tested using the reproduction resource provided in #5498 (hud.zip with a blank cache="false" script)

Copilot AI balanced review requested due to automatic review settings October 7, 2026 09:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ArranTuna

Copy link
Copy Markdown
Collaborator

Tested and works.

@FileEX FileEX added the bugfix Solution to a bug of any kind label Oct 7, 2026
@FileEX FileEX added this to the 1.7 (Current) milestone Oct 7, 2026
@FileEX
FileEX merged commit 89e432d into multitheftauto:master Oct 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Solution to a bug of any kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[1.7] Client scripts won't load if there's a blank script file with cache=false

4 participants