Codechange: address CodeQL issue "Multiplication result converted to larger type" (#10306)

Most are very unlikely to ever be triggered in our codebase; two
stand out: linkgraph and money cheat. Those, potentially, could
wrap earlier than expected.
This commit is contained in:
Patric Stout
2023-01-02 21:30:02 +01:00
committed by GitHub
parent fcbe390353
commit 1fb101eabb
26 changed files with 74 additions and 66 deletions

View File

@@ -204,7 +204,7 @@ static bool CreateMainSurface(uint w, uint h)
_screen.dst_ptr = _allegro_screen->line[0];
/* Initialise the screen so we don't blit garbage to the screen */
memset(_screen.dst_ptr, 0, _screen.height * _screen.pitch);
memset(_screen.dst_ptr, 0, static_cast<size_t>(_screen.height) * _screen.pitch);
/* Set the mouse at the place where we expect it */
poll_mouse();