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

botlib: print long int correctly #871

Merged
merged 1 commit into from Sep 25, 2016
Merged

Conversation

smcv
Copy link
Contributor

@smcv smcv commented Sep 25, 2016

value has type long, or equivalently signed long int. In C,
abs(some_long) returns int (to get a long result you would have to use
labs(some_long) due to lack of overloading), but in C++ it returns long.


Found by g++ 6 warnings. The fix should be portable (long int -> %ld is Standard C and C++).

value has type long, or equivalently signed long int. In C,
abs(some_long) returns int (to get a long result you would have to use
labs(some_long) due to lack of overloading), but in C++ it returns long.
@xycaleth xycaleth merged commit 04a7a2c into JACoders:master Sep 25, 2016
@smcv smcv deleted the print-long-int branch September 25, 2016 17:46
eternalcodes pushed a commit to eternalcodes/EternalJK that referenced this pull request Aug 21, 2018
botlib: print long int correctly
Former-commit-id: 049e55b
eternalcodes pushed a commit to eternalcodes/EternalJK that referenced this pull request Aug 21, 2018
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

Successfully merging this pull request may close these issues.

None yet

3 participants