Weiter Logic Fehler changed. v2.2
This commit is contained in:
parent
33fd4b0e47
commit
092b65d509
@ -168,7 +168,7 @@ std::string TextRenderer::adjustText(std::string newText) {
|
||||
}
|
||||
|
||||
if(currentLine == startLine) {
|
||||
return newText.substr(i, newText.size());
|
||||
return newText.substr(i + 1, newText.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -193,6 +193,8 @@ std::string TextRenderer::adjustText(std::string newText, int startLine, int end
|
||||
|
||||
if(currentLine == endLine) {
|
||||
endIndex = i;
|
||||
|
||||
return newText.substr(startIndex + 1, endIndex);
|
||||
}
|
||||
} else if (newText[i] != specialCharacter) {
|
||||
characterNumberOfCurrentLine++;
|
||||
@ -206,10 +208,14 @@ std::string TextRenderer::adjustText(std::string newText, int startLine, int end
|
||||
|
||||
if(currentLine == endLine) {
|
||||
endIndex = i;
|
||||
|
||||
return newText.substr(startIndex + 1, endIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Fehler!! when adjust string." << std::endl;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user