uniquify names
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 7 Mar 2020 13:21:38 +0000 (13:21 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 7 Mar 2020 13:21:38 +0000 (13:21 +0000)
src/decoder/power_fields.py

index 0672e1eeaa37657e8165eddd2b600cd8335d771a..746cb27f5d4fa8d333f1a8a0baa692650f5a5bbe 100644 (file)
@@ -67,7 +67,9 @@ def decode_instruction_fields(fields):
                     d[idx] = start
                     idx += 1
                     start += 1
-        res[f] = d
+        f = f.replace(",", "_")
+        unique = find_unique(res, f)
+        res[unique] = d
 
     return res