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 crash on passing false as value in table to table.copy(t) #2301

Closed
wants to merge 1 commit into from

Conversation

est31
Copy link
Contributor

@est31 est31 commented Feb 12, 2015

Fixes #2293.

@est31 est31 changed the title Fix crash on passing false as value to table.copy(t) Fix crash on passing false as value in table to table.copy(t) Feb 12, 2015
@est31
Copy link
Contributor Author

est31 commented Feb 12, 2015

changed commit message so that nobody thinks this now allows table.copy(false).

@ShadowNinja
Copy link
Member

  • copyiftable -> copy_if_table -> copy_val
  • Missing space after comma in second call to ^.
  • Function format is [local ]function x(), not [local ]x = function()
  • Maybe the helper function should be inlined.
  • Local functions are not global by definition, the do end is unnecessary.

@est31
Copy link
Contributor Author

est31 commented Feb 13, 2015

This method also works, and doesn't need a helper function.

@ShadowNinja
Copy link
Member

👍 (although I'd remove the superfluous parenthesis)

@Zeno-
Copy link
Contributor

Zeno- commented Feb 14, 2015

commit 7c5accf

Also added to freeze branch: commit 61588a4

@Zeno- Zeno- closed this Feb 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug @ Script API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

table.copy fails if one of input table's keys has a value of “false”
3 participants