# HG changeset patch # User lbessard # Date 1216828947 -7200 # Node ID 13fcb9328a028ba36163fc74d7d50dd5eb1cd85c # Parent 061f12bd838b3d78e277cb5db0076659d328aba9 Bug on Concise DCF edit dialog value generating fixed diff -r 061f12bd838b -r 13fcb9328a02 objdictgen/commondialogs.py --- a/objdictgen/commondialogs.py Tue Jul 22 23:48:48 2008 +0200 +++ b/objdictgen/commondialogs.py Wed Jul 23 18:02:27 2008 +0200 @@ -1565,13 +1565,15 @@ self.RefreshValues() def GetValues(self): - value = LE_to_BE(len(self.Values), 4) - for row in self.Values: - value += LE_to_BE(row["Index"], 2) - value += LE_to_BE(row["Subindex"], 1) - value += LE_to_BE(row["Size"], 4) - value += LE_to_BE(row["Value"], row["Size"]) - return value + if len(self.Values) > 0: + value = LE_to_BE(len(self.Values), 4) + for row in self.Values: + value += LE_to_BE(row["Index"], 2) + value += LE_to_BE(row["Subindex"], 1) + value += LE_to_BE(row["Size"], 4) + value += LE_to_BE(row["Value"], row["Size"]) + return value + return "" def RefreshValues(self): if len(self.Table.data) > 0: