summaryrefslogtreecommitdiff
path: root/celt/fixed_debug.h
diff options
context:
space:
mode:
authorRalph Giles <giles@mozilla.com>2011-11-30 11:54:20 -0800
committerRalph Giles <giles@mozilla.com>2012-03-05 17:09:54 -0800
commita855a1f0ff5e96a22c5ccce4276891e749cb3955 (patch)
tree96aed23934b7ce36c541a6a2f113959cc79473a4 /celt/fixed_debug.h
parent9357ae976e41a1418655e285a1988df808aa47a4 (diff)
downloadopus-a855a1f0ff5e96a22c5ccce4276891e749cb3955.tar.gz
Check for underflow in the debug USUB32.
Diffstat (limited to 'celt/fixed_debug.h')
-rw-r--r--celt/fixed_debug.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/celt/fixed_debug.h b/celt/fixed_debug.h
index 7b3df645..0a1adf4c 100644
--- a/celt/fixed_debug.h
+++ b/celt/fixed_debug.h
@@ -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))
{