diff --git a/src/classes/PMsrHandler.cpp b/src/classes/PMsrHandler.cpp index 1e8d4d20..f5f31488 100644 --- a/src/classes/PMsrHandler.cpp +++ b/src/classes/PMsrHandler.cpp @@ -2686,7 +2686,22 @@ bool PMsrHandler::HandleStatisticEntry(PMsrLines &lines) int status; double dval; unsigned int ival; + TString tstr; for (unsigned int i=0; i 0) { + if (!tstr.BeginsWith("#") && (!tstr.BeginsWith("STATISTIC")) && (!tstr.BeginsWith("chisq")) && (!tstr.BeginsWith("maxLH"))) { + cout << endl << ">> PMsrHandler::HandleStatisticEntry: **SYNTAX ERROR** in line " << lines[i].fLineNo; + cout << endl << ">> '" << lines[i].fLine.Data() << "'"; + cout << endl << ">> not a valid STATISTIC block line"; + cout << endl << ">> If you do not understand this, just remove the STATISTIC block, musrfit will recreate after fitting"; + cout << endl << endl; + return false; + } + } + // filter date and chisq etc from strings // extract date and time if (lines[i].fLine.Contains("STATISTIC")) {