More verbose debugging in case of assertion failure. XXX temporary for

AIX problem.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19757 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-01-08 10:17:31 +00:00
parent 265ce7ee85
commit fde9807985

View File

@@ -34,6 +34,7 @@
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
@@ -3005,7 +3006,16 @@ static mp_result s_udiv(mp_int a, mp_int b)
/* Solve for quotient digits, store in q.digits in reverse order */
while(r.digits >= da) {
assert(qpos <= q.alloc);
if (qpos > q.alloc) {
char buf[1024];
printf("qpos = %d q.alloc = %d da = %d ua = %d\n",
(int)qpos, (int)q.alloc, (int)da, (int)ua);
mp_int_to_string(a, 10, buf, sizeof(buf));
printf("a = %s\n", buf);
mp_int_to_string(b, 10, buf, sizeof(buf));
printf("b = %s\n", buf);
assert(qpos <= q.alloc);
}
if(s_ucmp(b, &r) > 0) {
r.digits -= 1;