diff options
| author | Camille Mougey <commial@gmail.com> | 2016-09-09 13:14:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-09 13:14:34 +0200 |
| commit | ceff0a4c76f13a2bdea69f7b846cc0d58a7af151 (patch) | |
| tree | 9c90972f6533c4ce244f0c03fac904a68764faf8 | |
| parent | 7a9024a00853a900d675862a113fe099a1274382 (diff) | |
| parent | bcb84fcc2683e7706094c67ab5de21ba8bb903b9 (diff) | |
| download | miasm-ceff0a4c76f13a2bdea69f7b846cc0d58a7af151.tar.gz miasm-ceff0a4c76f13a2bdea69f7b846cc0d58a7af151.zip | |
Merge pull request #426 from serpilliere/fix_jitter_iterator
Jitter: Fix iterator handling
| -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. |