diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-09-09 12:45:47 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-09-09 12:47:00 +0200 |
| commit | bcb84fcc2683e7706094c67ab5de21ba8bb903b9 (patch) | |
| tree | 9c90972f6533c4ce244f0c03fac904a68764faf8 /miasm2/jitter/jitload.py | |
| parent | 7a9024a00853a900d675862a113fe099a1274382 (diff) | |
| download | miasm-bcb84fcc2683e7706094c67ab5de21ba8bb903b9.tar.gz miasm-bcb84fcc2683e7706094c67ab5de21ba8bb903b9.zip | |
Jitter: Fix iterator handling
Diffstat (limited to '')
| -rw-r--r-- | miasm2/jitter/jitload.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/miasm2/jitter/jitload.py b/miasm2/jitter/jitload.py index e28c6765..b2416fd5 100644 --- a/miasm2/jitter/jitload.py +++ b/miasm2/jitter/jitload.py @@ -326,7 +326,11 @@ class jitter: exception_flag = self.get_exception() for res in self.exceptions_handler(exception_flag, self): if res is not True: - yield res + if isinstance(res, collections.Iterator): + for tmp in res: + yield tmp + else: + yield res # If a callback changed pc, re call every callback if old_pc != self.pc: @@ -342,7 +346,11 @@ class jitter: exception_flag = self.get_exception() for res in self.exceptions_handler(exception_flag, self): if res is not True: - yield res + if isinstance(res, collections.Iterator): + for tmp in res: + yield tmp + else: + yield res def init_run(self, pc): """Create an iterator on pc with runiter. |