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

ShowFloatingGamepadTextInput incorrectly checks if the 5th arg is a String instead of an Int32, resulting in a "bad arguments" error when attempting to call. #333

Open
MelvorIdle opened this issue Nov 6, 2024 · 0 comments

Comments

@MelvorIdle
Copy link

Thank you for the implementation of this API.

Unfortunately, ShowFloatingGamepadTextInput incorrectly checks if the 5th arg is a String instead of an Int32, resulting in a "bad arguments" error when attempting to call.

Code in question:
src/api/steam_api_utils.cc

NAN_METHOD(ShowFloatingGamepadTextInput) {
  Nan::HandleScope scope;
  if (info.Length() < 5 || !info[0]->IsInt32() || !info[1]->IsInt32() ||
      !info[2]->IsInt32() || !info[3]->IsInt32() || !info[4]->IsString()) {
    THROW_BAD_ARGS("Bad arguments");
  }

I believe !info[4]->IsString()) should instead be !info[4]->IsInt32())

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

No branches or pull requests

1 participant