[apps] Fix StorageFunction::nameWithArgument return value

This commit is contained in:
Léa Saviot
2018-10-12 14:29:52 +02:00
committed by Émilie Feral
parent 03f5ec3ca1
commit b3396e6be0

View File

@@ -41,7 +41,7 @@ int StorageFunction::nameWithArgument(char * buffer, size_t bufferSize, char arg
assert(functionName < fullName() + strlen(fullName()));
buffer[index++] = *functionName++;
}
return index - 1 + strlcpy(&buffer[index], ofXSring, bufferSize);
return index + strlcpy(&buffer[index], ofXSring, bufferSize-index);
}
template<typename T>