Fix string format of field
[bitfield] / bitfield
index b0dfcc0a341ce0982c0ab8962ae701eaf4acf7dc..da2b94b7f294fe23c24a864da5f502e955b486ed 100644 (file)
--- a/bitfield
+++ b/bitfield
@@ -89,7 +89,7 @@ class register:
                                continue
                        desc = field.value(v)
                        if desc is not None:
-                               str += "%*s: 0x%s [%s]\n" \
+                               str += "%*s: 0x%x [%s]\n" \
                                        % (name_width, field.name, v, desc)
                        else:
                                str += "%*s: 0x%x\n" \