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:
psykose 2024-01-27 08:48:25 +00:00 committed by tildearrow
parent 68ee5167ee
commit 3f329e464d
2 changed files with 6 additions and 5 deletions

View file

@ -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();