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);