From b3396e6be01fdeecee2da862bf6c46adbf3ae81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Fri, 12 Oct 2018 14:29:52 +0200 Subject: [PATCH] [apps] Fix StorageFunction::nameWithArgument return value --- apps/shared/storage_function.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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