We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 682fa64 commit a38a9b2Copy full SHA for a38a9b2
ProperTree.py
@@ -1214,7 +1214,14 @@ def convert_values(self, event = None):
1214
self.f_text.delete(0,tk.END)
1215
self.f_text.insert(0,from_value)
1216
from_value = base64.b64decode(self.get_bytes(from_value))
1217
- elif from_type in ["hex","decimal"]:
+ elif from_type in ("hex","decimal"):
1218
+ if len(from_value) % 2:
1219
+ # Ensure we pad our hex
1220
+ from_value = "0"+from_value
1221
+ # Reflect it visually for all cases that need it
1222
+ if to_type not in ("hex","decimal"):
1223
+ self.f_text.delete(0,tk.END)
1224
+ self.f_text.insert(0,from_value)
1225
from_value = binascii.unhexlify(self.get_bytes(from_value))
1226
# Let's get the data converted
1227
to_value = self.get_bytes(from_value)
0 commit comments