From ff58087a3f686bfcfa304c28179fb2b03c4a0a46 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 5 Aug 2011 14:02:39 +1000 Subject: s4-pysamba: fixed double conversion of int32 if the number is already negative, we shouldn't convert it --- source4/scripting/python/samba/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit