diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-08-05 14:02:39 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-08-09 11:56:23 +0200 |
commit | ff58087a3f686bfcfa304c28179fb2b03c4a0a46 (patch) | |
tree | 9ed69cc396a1950079bfee4995bd28a678cd1d7a | |
parent | fd04a38d5063cd5b90970c7a89a1f12701833df7 (diff) | |
download | samba-ff58087a3f686bfcfa304c28179fb2b03c4a0a46.tar.gz samba-ff58087a3f686bfcfa304c28179fb2b03c4a0a46.tar.bz2 samba-ff58087a3f686bfcfa304c28179fb2b03c4a0a46.zip |
s4-pysamba: fixed double conversion of int32
if the number is already negative, we shouldn't convert it
-rw-r--r-- | source4/scripting/python/samba/common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/common.py b/source4/scripting/python/samba/common.py index 867f44a116..5a9fae1c92 100644 --- a/source4/scripting/python/samba/common.py +++ b/source4/scripting/python/samba/common.py @@ -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) |