From 88ea88feeb674f3254d8f713601747d1b38b1c31 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 30 Nov 2007 18:32:42 +0000 Subject: [PATCH] Fix prev cleanup. --- libraries/liblutil/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5