From: Howard Chu Date: Fri, 30 Nov 2007 18:32:42 +0000 (+0000) Subject: Fix prev cleanup. X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~375 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=88ea88feeb674f3254d8f713601747d1b38b1c31;p=openldap Fix prev cleanup. --- diff --git a/libraries/liblutil/utils.c b/libraries/liblutil/utils.c index 089519e745..769a4db6bc 100644 --- a/libraries/liblutil/utils.c +++ b/libraries/liblutil/utils.c @@ -640,8 +640,8 @@ scale( int new, lutil_int_decnum *prev, unsigned char *tmp ) } } - out = tmp + prev->bufsiz - 1; - for ( i = 0; new ; i-- ) { + out = tmp + prev->bufsiz; + for ( i = -1; new ; i-- ) { new += out[i]; out[i] = new & 0xff; new >>= 8;