Fix Coverity
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 16 Dec 2011 13:58:55 +0000 (13:58 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 16 Dec 2011 13:58:55 +0000 (13:58 +0000)
TTherminator/Therminator/Parser.cxx

index b3b30ba..2c485d7 100644 (file)
@@ -310,9 +310,11 @@ void Parser::ReadInput()
          if (!tThirdComma) exit(0);
          tRBracket = strchr(tThirdComma,']');
 
-         if (!((tLBrackert != NULL) && (tFirstComma != NULL) && (tSecondComma != NULL) && ( tThirdComma != NULL) && (tRBracket!= NULL)))
+         if (!((tLBrackert != NULL) && (tFirstComma != NULL) && (tSecondComma != NULL) && ( tThirdComma != NULL) && (tRBracket!= NULL))) {
            PRINT_DEBUG_1("Malformed line!: " << str);
-         
+           exit(0);
+         }
+
          char *tFather = new char[tFirstComma-tLBrackert];
          strncpy(tFather, tLBrackert+1,   tFirstComma-tLBrackert-1);
          char *tDaughter1 = new char[tSecondComma-tFirstComma];