diff --git a/JsonGeneratorTests/StringBuilder.cpp b/JsonGeneratorTests/StringBuilder.cpp index d9e3167a..af4b2b98 100644 --- a/JsonGeneratorTests/StringBuilder.cpp +++ b/JsonGeneratorTests/StringBuilder.cpp @@ -10,9 +10,12 @@ void StringBuilder::append(const char* s) { char* tail = buffer + length; - strncpy(tail, s, capacity - length); + while (*s && length