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

lib: fix misleading argument of validateUint32 #53307

Merged

Commits on Jun 3, 2024

  1. lib: fix misleading argument of validateUint32

    The type of the argument `positive` was declared as `boolean|number`,
    which is misleading because the function treats it as a boolean only.
    Some call sites even passed numbers, specifically, either `0` or `1`,
    which happen to work as expected because they are interpreted as `false`
    and `true`, respectively. However, passing `2` would silently lead to
    unexpected behavior. Thus, strictly make the argument a boolean.
    tniessen committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    da9fbe1 View commit details
    Browse the repository at this point in the history