]> git.sur5r.net Git - openldap/commitdiff
Fix rev 1.49
authorHoward Chu <hyc@openldap.org>
Fri, 30 Nov 2007 18:10:22 +0000 (18:10 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 30 Nov 2007 18:10:22 +0000 (18:10 +0000)
libraries/liblutil/utils.c

index f5727fa65614c7633ed2c48eb6d3fa6c821903b5..8e87ce44cc35ec403f7f8070e6ce6faa55a0c611 100644 (file)
@@ -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 );
 }