diff --git a/apps/shared/storage_function.cpp b/apps/shared/storage_function.cpp index 44ef8da59..6fd65efd8 100644 --- a/apps/shared/storage_function.cpp +++ b/apps/shared/storage_function.cpp @@ -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