Skip to content
Snippets Groups Projects
Commit 4404d8c6 authored by Phil's avatar Phil
Browse files

Forced 32bits value in utils.ltoa() (ticket #145)

parent fae2029b
No related branches found
No related tags found
No related merge requests found
...@@ -270,7 +270,7 @@ def atol(x): ...@@ -270,7 +270,7 @@ def atol(x):
ip = inet_aton(socket.gethostbyname(x)) ip = inet_aton(socket.gethostbyname(x))
return struct.unpack("!I", ip)[0] return struct.unpack("!I", ip)[0]
def ltoa(x): def ltoa(x):
return inet_ntoa(struct.pack("!I", x)) return inet_ntoa(struct.pack("!I", x&0xffffffff))
def itom(x): def itom(x):
return (0xffffffff00000000L>>x)&0xffffffffL return (0xffffffff00000000L>>x)&0xffffffffL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment