Don't coerce data type twice

This commit is contained in:
Caleb Deveraux 2010-09-27 11:29:08 +08:00 committed by David Vierra
parent f7fc6ba343
commit e1d583f51d

2
nbt.py
View File

@ -49,7 +49,7 @@ class TAG_Value:
def __init__(self, value=0, name=None, data=""):
self.name=name
if(data==""):
self.value = self.dataType(value)
self.value = value
else:
(self.value,) = struct.unpack(self.fmt, data[0:struct.calcsize(self.fmt)]);