-
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cast to larger type before doing arithmetic to avoid signed integer o…
…verflow https://godbolt.org/z/soTad4zEq this godbolt links shows that it is UB to multiply then cast if the amount is large enough
- Loading branch information
1 parent
f297287
commit b626f65
Showing
2 changed files
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters