Fix an off-the-end string pointer bug (showed up only in some Win32 builds).
authorMorgan Deters <mdeters@cs.nyu.edu>
Wed, 26 Mar 2014 22:05:02 +0000 (18:05 -0400)
committerMorgan Deters <mdeters@cs.nyu.edu>
Wed, 26 Mar 2014 22:32:37 +0000 (18:32 -0400)
src/theory/logic_info.cpp

index 525b129cf969fc949ec4fa555155ffdb4b231303..a85044cecebf8e8303706fe68f5c440e1ea5a89e 100644 (file)
@@ -153,7 +153,9 @@ void LogicInfo::setLogicString(std::string logicString) throw(IllegalArgumentExc
   enableTheory(THEORY_BOOL);
 
   const char* p = logicString.c_str();
-  if(!strcmp(p, "QF_SAT") || *p == '\0') {
+  if(*p == '\0') {
+    // propositional logic only; we're done.
+  } else if(!strcmp(p, "QF_SAT")) {
     // propositional logic only; we're done.
     p += 6;
   } else if(!strcmp(p, "QF_ALL_SUPPORTED")) {