From: Howard Chu Date: Fri, 30 Nov 2007 18:10:22 +0000 (+0000) Subject: Fix rev 1.49 X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~378 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=14573820ec4d0c6e48e5804ab3c862702901678f;p=openldap Fix rev 1.49 --- diff --git a/libraries/liblutil/utils.c b/libraries/liblutil/utils.c index f5727fa656..8e87ce44cc 100644 --- a/libraries/liblutil/utils.c +++ b/libraries/liblutil/utils.c @@ -638,9 +638,6 @@ scale( int new, lutil_int_decnum *prev, unsigned char *tmp ) part >>= 8; } } - j++; - prev->beg += j; - prev->len -= j; } out = tmp + prev->bufsiz - 1; @@ -651,11 +648,9 @@ scale( int new, lutil_int_decnum *prev, unsigned char *tmp ) if (!new ) break; } - if ( !prev->len ) { - prev->beg += i; - prev->len = -i; - prev->len++; - } + i--; + prev->beg = prev->bufsiz + i; + prev->len = -i; AC_MEMCPY( prev->buf+prev->beg, tmp+prev->beg, prev->len ); }