Skip to content
Snippets Groups Projects
Commit a855a1f0 authored by Ralph Giles's avatar Ralph Giles
Browse files

Check for underflow in the debug USUB32.

parent 9357ae97
No related branches found
No related tags found
No related merge requests found
......@@ -271,6 +271,10 @@ static inline unsigned int USUB32_(unsigned long long a, unsigned long long b, c
{
fprintf (stderr, "USUB32: inputs are not uint32: %llu %llu in %s: line %d\n", a, b, file, line);
}
if (a<b)
{
fprintf (stderr, "USUB32: inputs underflow: %llu < %llu in %s: line %d\n", a, b, file, line);
}
res = a-b;
if (!VERIFY_UINT(res))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment