mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-28 17:47:33 -05:00
Fix dec to bin for zero value
This commit is contained in:
parent
936bd65b49
commit
b710993764
1 changed files with 6 additions and 7 deletions
|
|
@ -648,14 +648,13 @@ scale( int new, _decnum *prev, unsigned char *tmp )
|
|||
new += out[i];
|
||||
out[i] = new & 0xff;
|
||||
new >>= 8;
|
||||
if (!new ) {
|
||||
if ( !prev->len ) {
|
||||
prev->beg += i;
|
||||
prev->len = -i;
|
||||
prev->len++;
|
||||
}
|
||||
if (!new )
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( !prev->len ) {
|
||||
prev->beg += i;
|
||||
prev->len = -i;
|
||||
prev->len++;
|
||||
}
|
||||
AC_MEMCPY( prev->buf+prev->beg, tmp+prev->beg, prev->len );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue