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

Header : signed integer overflow #102

Open
Geompse opened this issue Nov 26, 2019 · 0 comments
Open

Header : signed integer overflow #102

Geompse opened this issue Nov 26, 2019 · 0 comments

Comments

@Geompse
Copy link

Geompse commented Nov 26, 2019

When any of the memory usage values exceeds 2 147 483 648, on my system it gets generated in the JSON file as a negative integer.
This is a normal behavior for sprintf when called with %d : the argument is treated as an integer and presented as a signed decimal number.
You should replace %d with %lu : long unsigned decimal number.
%ld is a working replacement too, but since those values can't be negative...

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