mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-02 16:26:48 +00:00
Co-authored-by: semgrep-companion-app[bot] <218312740+semgrep-companion-app[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
14 lines
303 B
C++
14 lines
303 B
C++
#include <iostream>
|
|
#include <limits>
|
|
|
|
int
|
|
main()
|
|
{
|
|
int maxInt = std::numeric_limits<int>::max();
|
|
int volatile one = 1;
|
|
std::cout << "Current max: " << maxInt << std::endl;
|
|
int overflowed = maxInt + one;
|
|
std::cout << "Overflowed result: " << overflowed << std::endl;
|
|
return 0;
|
|
}
|