added a condition that I missed

This commit is contained in:
amarjeetkapoor1 2016-06-28 00:47:59 +05:30
parent 02b735c6ae
commit c241dd1e4a

View file

@ -1781,12 +1781,15 @@ void MainWindow::addparameter(const char *fulltext){
string MainWindow::getParameter(string fulltext, int loc){
int start = 0;
if( loc<1){
return " ";
}
for(; start<fulltext.length() ; start++){
if(fulltext[start]=='\n')
loc--;
if(loc==1)
if(loc<=1)
break;
}