fix error in string-copy example of "Avoiding pitfalls"

Norwin
2016-08-20 00:51:56 +02:00
parent 6a3a71c697
commit 2257fcd199

@@ -84,7 +84,7 @@ For instance the following code will not work as expected:
JsonArray& array = jsonBuffer.createArray(); JsonArray& array = jsonBuffer.createArray();
for (int i=0; i<3; i++) { for (int i=0; i<3; i++) {
char buffer[16]; char buffer[16];
sprintf(buffer, "iteration %d", 0); sprintf(buffer, "iteration %d", i);
array.add(buffer); array.add(buffer);
} }
array.printTo(Serial); array.printTo(Serial);