projects
/
cycript.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa926c8
)
Do not assert if the tab completer is given garbage.
author
Jay Freeman (saurik)
<saurik@saurik.com>
Mon, 4 Jun 2012 12:13:14 +0000
(
05:13
-0700)
committer
Jay Freeman (saurik)
<saurik@saurik.com>
Mon, 4 Jun 2012 12:13:52 +0000
(
05:13
-0700)
Console.cpp
patch
|
blob
|
blame
|
history
diff --git
a/Console.cpp
b/Console.cpp
index b7a4533c571c995b4ac128aa76b0884a3317d46a..c6e13cb6f4504abca48615cb5f4110557b545bed 100644
(file)
--- a/
Console.cpp
+++ b/
Console.cpp
@@
-211,7
+211,7
@@
static CYExpression *ParseExpression(CYUTF8String code) {
Setup(driver, parser);
if (parser.parse() != 0 || !driver.errors_.empty())
-
_assert(false)
;
+
return NULL
;
CYExpress *express(dynamic_cast<CYExpress *>(driver.program_->statements_));
_assert(express != NULL);
@@
-297,6
+297,9
@@
static char **Complete(const char *word, int start, int end) {
CYUTF8String json(Run(pool, client_, code));
CYExpression *result(ParseExpression(json));
+ if (result == NULL)
+ return NULL;
+
CYArray *array(dynamic_cast<CYArray *>(result));
if (array == NULL) {