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

Possibly misleading error message #53

Open
hvds opened this issue Jun 4, 2021 · 1 comment
Open

Possibly misleading error message #53

hvds opened this issue Jun 4, 2021 · 1 comment

Comments

@hvds
Copy link
Contributor

hvds commented Jun 4, 2021

In XS.xs:_validate_int() I see:

  if (len == 0 || ptr == 0)  croak("Parameter must be a positive integer");
  if (ptr[0] == '-' && negok) {
    isneg = 1; ptr++; len--;           /* Read negative sign */

It looks like the message should be negok ? "Parameter must be an integer" : "Parameter must be a positive integer".

@danaj
Copy link
Owner

danaj commented Jun 5, 2021

It looks like that was fixed in February in github, with the same behavior. Those changes also tried to consistently use "non-negative" rather than "positive" unless zero is not allowed.

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

2 participants