GUI: fix overflow in timers
these timer variables are used with SDL_GetPerformanceCounter, which returns a uint64_t. subtracting these can overflow, which is UB.
This commit is contained in:
parent
68ee5167ee
commit
3f329e464d
2 changed files with 6 additions and 5 deletions
|
|
@ -3411,7 +3411,7 @@ bool FurnaceGUI::detectOutOfBoundsWindow(SDL_Rect& failing) {
|
|||
}
|
||||
|
||||
#define DECLARE_METRIC(_n) \
|
||||
int __perfM##_n;
|
||||
uint64_t __perfM##_n;
|
||||
|
||||
#define MEASURE_BEGIN(_n) \
|
||||
__perfM##_n=SDL_GetPerformanceCounter();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue