Skip to content

Fix table.update crash when merging tables#8704

Closed
vadi2 wants to merge 1 commit intodevelopmentfrom
fix-table-update-type-check
Closed

Fix table.update crash when merging tables#8704
vadi2 wants to merge 1 commit intodevelopmentfrom
fix-table-update-type-check

Conversation

@vadi2
Copy link
Copy Markdown
Member

@vadi2 vadi2 commented Dec 27, 2025

Brief overview of PR changes/additions

Fix table.update crashing when the second table has a nested table at a key where the first table has a simple value.

Motivation for adding to Mudlet

table.update({ x = 1 }, { x = { y = 2 } }) would crash instead of working.

Other info (issues closed, discussion etc)

Closes #8694

@vadi2 vadi2 requested a review from a team as a code owner December 27, 2025 09:40
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Dec 27, 2025

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

vadi2 added a commit to ehussong/Mudlet that referenced this pull request Jan 23, 2026
Only recurse when both source and destination are tables.
Otherwise, just replace the value directly.
@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jan 23, 2026

Closing in favour of #8751 which has test case.

@vadi2 vadi2 closed this Jan 23, 2026
@vadi2 vadi2 deleted the fix-table-update-type-check branch January 23, 2026 18:22
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.

table.update errors out in unpredictable, input-dependent ways

2 participants