Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

sh2.py (CodeField.generate_comments): add comments to help identify w…

…ord- and byte-length values, as well as longs.
  • Loading branch information...
commit cea9838ae0165b272fba58dff78ac69c58b7406d 1 parent 63be5b7
@logic authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 sh2.py
View
5 sh2.py
@@ -132,7 +132,10 @@ def generate_comments(self):
t2label = '0x%X' % meta.extra
comments.append('[%s] = %s' % (label, t2label))
elif 'label' not in self.extra.text:
- comments.append(label)
+ if isinstance(meta, WordField) or isinstance(meta, ByteField):
+ comments.append('[%s] = 0x%X' % (label, meta.extra))
+ else:
+ comments.append(label)
return comments
Please sign in to comment.
Something went wrong with that request. Please try again.