mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
s4-pysamba: fixed double conversion of int32
if the number is already negative, we shouldn't convert it
This commit is contained in:
parent
fd04a38d50
commit
ff58087a3f
@ -52,6 +52,6 @@ def confirm(msg, forced = False, allow_all=False):
|
||||
|
||||
def normalise_int32(ivalue):
|
||||
'''normalise a ldap integer to signed 32 bit'''
|
||||
if int(ivalue) & 0x80000000:
|
||||
if int(ivalue) & 0x80000000 and int(ivalue) > 0:
|
||||
return str(int(ivalue) - 0x100000000)
|
||||
return str(ivalue)
|
||||
|
Loading…
x
Reference in New Issue
Block a user