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 GetCommandsBoundToKey to handle command binds without szArguments #40

Merged
merged 1 commit into from
Jul 23, 2016

Conversation

Necktrox
Copy link
Contributor

@Necktrox Necktrox commented Apr 6, 2016

In cases where szArguments is empty, the return table will be empty, even when there is a command bound to that key.

Before this patch, getCommandsBoundToKey("p") would have returned an empty table, even when the resource admin has a command bound to that key, which you can confirm with getBoundKeys("admin") = { ["p"] = "down" }.

In cases where szArguments is empty, the return table will be empty,
even when there is a command bound to that key
@qaisjp
Copy link
Contributor

qaisjp commented Jun 18, 2016

So the null character \0 in szArguments causes the entire table to "break"?

@Necktrox
Copy link
Contributor Author

IIRC yes.

@Necktrox
Copy link
Contributor Author

Source code line

This is where I found the relevant source code to update the present code above.

@qaisjp qaisjp merged commit 0087420 into multitheftauto:master Jul 23, 2016
@qaisjp
Copy link
Contributor

qaisjp commented Jul 23, 2016

Nice work! Sorry for taking so long with the merge.

note: the output table will still contain commands with multiple arguments. only commands with no arguments are missing from the output table.

@Necktrox Necktrox deleted the fix/commandbinds branch September 14, 2016 16:03
@qaisjp qaisjp added the bug Something isn't working label Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants