From: Morgan Deters Date: Wed, 26 Mar 2014 22:05:02 +0000 (-0400) Subject: Fix an off-the-end string pointer bug (showed up only in some Win32 builds). X-Git-Tag: cvc5-1.0.0~6987^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d58a9801973f9f30f720385b8deeca50c26a719;p=cvc5.git Fix an off-the-end string pointer bug (showed up only in some Win32 builds). --- diff --git a/src/theory/logic_info.cpp b/src/theory/logic_info.cpp index 525b129cf..a85044cec 100644 --- a/src/theory/logic_info.cpp +++ b/src/theory/logic_info.cpp @@ -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")) {