diff options
| author | serpilliere <devnull@localhost> | 2014-06-24 15:06:26 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2014-06-24 15:06:26 +0200 |
| commit | f328270d56dd649bdeb87afac6d31c3c652b55ca (patch) | |
| tree | 336b2343f080777f46caf3f0d53c22f2250cc853 /miasm2/core/cpu.py | |
| parent | 70e7237106321ddf6fb2db198cdf45d06b74581a (diff) | |
| download | miasm-f328270d56dd649bdeb87afac6d31c3c652b55ca.tar.gz miasm-f328270d56dd649bdeb87afac6d31c3c652b55ca.zip | |
Cpu: bs_mod_name accept dict
Diffstat (limited to '')
| -rw-r--r-- | miasm2/core/cpu.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py index 7d672caa..9ce551db 100644 --- a/miasm2/core/cpu.py +++ b/miasm2/core/cpu.py @@ -532,7 +532,13 @@ class bs_mod_name(bs_divert): out = [] for candidate in candidates: cls, name, bases, dct, fields = candidate - for value, new_name in enumerate(self.args['mn_mod']): + tab = self.args['mn_mod'] + if isinstance(tab, list): + tmp = {} + for j, v in enumerate(tab): + tmp[j] = v + tab = tmp + for value, new_name in tab.items(): nfields = fields[:] s = int2bin(value, self.args['l']) args = dict(self.args) |