mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-08-08 15:14:42 +02:00
fix error in string-copy example of "Avoiding pitfalls"
@@ -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);
|
||||
|
Reference in New Issue
Block a user