From 2257fcd1996748fa4deb0d695c1d9ff588af76cf Mon Sep 17 00:00:00 2001 From: Norwin Date: Sat, 20 Aug 2016 00:51:56 +0200 Subject: [PATCH] fix error in string-copy example of "Avoiding pitfalls" --- Avoiding-pitfalls.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Avoiding-pitfalls.md b/Avoiding-pitfalls.md index 916cf15..e354a66 100644 --- a/Avoiding-pitfalls.md +++ b/Avoiding-pitfalls.md @@ -84,7 +84,7 @@ For instance the following code will not work as expected: JsonArray& array = jsonBuffer.createArray(); for (int i=0; i<3; i++) { char buffer[16]; - sprintf(buffer, "iteration %d", 0); + sprintf(buffer, "iteration %d", i); array.add(buffer); } array.printTo(Serial);