mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-26 12:27:44 +00:00
tests: avoid undefined signed overflow
This commit is contained in:
committed by
Anonymous Maarten
parent
156b3b4a8c
commit
efba42a67b
@@ -180,8 +180,8 @@ static int TestEndian(bool verbose)
|
||||
|
||||
static int TST_allmul(void *a, void *b, int arg, void *result, void *expected)
|
||||
{
|
||||
(*(long long *)result) = ((*(long long *)a) * (*(long long *)b));
|
||||
return (*(long long *)result) == (*(long long *)expected);
|
||||
(*(unsigned long long *)result) = ((*(unsigned long long *)a) * (*(unsigned long long *)b));
|
||||
return (*(unsigned long long *)result) == (*(unsigned long long *)expected);
|
||||
}
|
||||
|
||||
static int TST_alldiv(void *a, void *b, int arg, void *result, void *expected)
|
||||
|
||||
Reference in New Issue
Block a user