]> git.saurik.com Git - cycript.git/blobdiff - Console.cpp
Fixed the #.prop case, made invalid bridging throw instead of assert, and added a...
[cycript.git] / Console.cpp
index f65323ea7e6f0e4c385a1ec868cbdefddfe03906..53571037ef6157d1e702462d2c474d938639204f 100644 (file)
@@ -597,9 +597,10 @@ int Main(int argc, char const * const argv[], char const * const envp[]) {
             for (CYDriver::Errors::const_iterator i(driver.errors_.begin()); i != driver.errors_.end(); ++i)
                 std::cerr << i->location_.begin << ": " << i->message_ << std::endl;
         } else if (driver.program_ != NULL)
-            if (client != -1)
-                Run(client, start, end - start, stdout);
-            else {
+            if (client != -1) {
+                std::string code(start, end-start);
+                Run(client, code, stdout);
+            } else {
                 std::ostringstream str;
                 CYOutput out(str);
                 Setup(out, driver);