[apps/cartesian_function] Fix derivative name display

Scenario: f(x) = x, go to the Values tab of the Graph app, display the
derivative, there is a roblem with UTF8
This commit is contained in:
Léa Saviot
2019-05-02 12:30:51 +02:00
committed by Émilie Feral
parent e53b0e6bba
commit d97d5d40f5

View File

@@ -74,7 +74,7 @@ int CartesianFunction::derivativeNameWithArgument(char * buffer, size_t bufferSi
if (!UTF8Helper::CodePointIs(firstParenthesis, '(')) {
return numberOfChars;
}
memmove(firstParenthesis + derivativeSize, firstParenthesis, buffer + numberOfChars - firstParenthesis);
memmove(firstParenthesis + derivativeSize, firstParenthesis, numberOfChars - (firstParenthesis - buffer) + 1);
UTF8Decoder::CodePointToChars('\'', firstParenthesis, derivativeSize);
return numberOfChars + derivativeSize;
}