enigma-dev/enigma-dev — pull request #906 by sorlok (2014-12-27 21:54:59+00:00)
Title: Fixes offset drift caused by multiple macros in the same sub-macro replacement

This fixes https://github.com/enigma-dev/enigma-dev/issues/903

Basically, the _flatten() function (which is only called within an existing macro substitution) was failing to account for the fact that a macro's replacement text might have a different size than its original text. This would only affect the result if two macros existed inside another macro. While rare, it does happen from time to time.