diff options
author | Morgan Deters <mdeters@gmail.com> | 2011-05-02 05:04:36 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2011-05-02 05:04:36 +0000 |
commit | 99c42d62491307279403059690fa31be1fb3af63 (patch) | |
tree | 8f8a40a893e1a59e28015201f907e2cecede3294 /src/main | |
parent | bf837ea666980a0556d7881316f34be7ad1e2ea2 (diff) |
Minor fixes to various parts of CVC4, including the removal of the uintptr_t constructors for Type and Expr (which existed due to ANTLR limitations). These issues are now handled (as a hack, due to said limitations) in the parser rather than the CVC4 core.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/interactive_shell.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/interactive_shell.cpp b/src/main/interactive_shell.cpp index cf04dacdf..707fc0ef3 100644 --- a/src/main/interactive_shell.cpp +++ b/src/main/interactive_shell.cpp @@ -130,7 +130,7 @@ Command* InteractiveShell::readCommand() { throw ParserException("Interactive input broken."); } - char* lineBuf; + char* lineBuf = NULL; string input; stringbuf sb; string line; @@ -138,12 +138,12 @@ Command* InteractiveShell::readCommand() { /* Prompt the user for input. */ if(d_usingReadline) { #if HAVE_LIBREADLINE - lineBuf = ::readline("CVC4> "); - if(lineBuf != NULL && lineBuf[0] != '\0') { - ::add_history(lineBuf); - } - line = lineBuf == NULL ? "" : lineBuf; - free(lineBuf); + lineBuf = ::readline("CVC4> "); + if(lineBuf != NULL && lineBuf[0] != '\0') { + ::add_history(lineBuf); + } + line = lineBuf == NULL ? "" : lineBuf; + free(lineBuf); #endif /* HAVE_LIBREADLINE */ } else { d_out << "CVC4> " << flush; |