From: Jay Freeman (saurik) Date: Tue, 5 Jun 2012 01:23:59 +0000 (-0700) Subject: Remove empty expression statements from the output. X-Git-Tag: v0.9.456~38 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/9cd63688ae354a40aa0d7995984d77b83706f241?ds=sidebyside Remove empty expression statements from the output. --- diff --git a/Parser.hpp b/Parser.hpp index 033c12c..2743166 100644 --- a/Parser.hpp +++ b/Parser.hpp @@ -384,7 +384,8 @@ struct CYContext { Type_ **last(&values); CYForEach (next, values) { Replace(*last = next); - last = &(*last)->next_; + if (*last != NULL) + last = &(*last)->next_; } } diff --git a/Replace.cpp b/Replace.cpp index 00f6419..f51d223 100644 --- a/Replace.cpp +++ b/Replace.cpp @@ -240,7 +240,7 @@ CYStatement *CYEmpty::Collapse(CYContext &context) { } CYStatement *CYEmpty::Replace(CYContext &context) { - return this; + return NULL; } CYStatement *CYExpress::Collapse(CYContext &context) {