Skip to content

Conversation

@rgnine
Copy link
Contributor

@rgnine rgnine commented May 2, 2014

Another issue where lua tables start at index 0 instead of 1. This caused checks for example for number of children in
ret, children = zklua.get_children(zh, path, 0)
to return 0 to a subsequent size check with #children as the table is { 0 -> firstchild }

With this change, the first children entry will be pushed to lua index 1 and #children will work as expected as will all standard lua iterator functions that expect arrays to start at 1.

Another issue where lua tables start at index 0 instead of 1. This caused checks for example for number of children in 
ret, children = zklua.get_children(zh, path, 0)
to return 0 to a subsequent size check with #children as the table is { 0 -> firstchild }

With this change, the first children entry will be pushed to lua index 1 and #children will work as expected as will all standard lua iterator functions that expect arrays to start at 1.
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.

1 participant