Check for underflow in the debug USUB32.
This commit is contained in:
parent
9357ae976e
commit
a855a1f0ff
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
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;
|
res = a-b;
|
||||||
if (!VERIFY_UINT(res))
|
if (!VERIFY_UINT(res))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue