]> git.saurik.com Git - cycript.git/blobdiff - Console.cpp
Expose Objective-C class names to tab completion.
[cycript.git] / Console.cpp
index 89cd62ef635192ee0730650f57f1bd60949640d2..df7d57b34165b994a3c889ebd69ead5dc2985ae7 100644 (file)
@@ -482,7 +482,7 @@ static void Console(CYOptions &options) {
             if (parser.parse() != 0 || !driver.errors_.empty()) {
                 for (CYDriver::Errors::const_iterator error(driver.errors_.begin()); error != driver.errors_.end(); ++error) {
                     cy::position begin(error->location_.begin);
-                    if (begin.line != lines.size() || begin.column - 1 != lines.back().size() || error->warning_) {
+                    if (begin.line != lines.size() || begin.column < lines.back().size() || error->warning_) {
                         cy::position end(error->location_.end);
 
                         if (begin.line != lines.size()) {
@@ -491,7 +491,7 @@ static void Console(CYOptions &options) {
                         }
 
                         std::cerr << "....";
-                        for (size_t i(0); i != begin.column - 1; ++i)
+                        for (size_t i(0); i != begin.column; ++i)
                             std::cerr << '.';
                         if (begin.line != end.line || begin.column == end.column)
                             std::cerr << '^';
@@ -573,7 +573,7 @@ int Main(int argc, char const * const argv[], char const * const envp[]) {
     bool compile(false);
     CYOptions options;
 
-    append_history$ = reinterpret_cast<int (*)(int, const char *)>(dlsym(RTLD_DEFAULT, "append_history"));
+    append_history$ = (int (*)(int, const char *)) (dlsym(RTLD_DEFAULT, "append_history"));
 
 #ifdef CY_ATTACH
     pid_t pid(_not(pid_t));