From 2f7232859e2eaebca561b08c3ff4b2f2335493ea Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Wed, 23 Nov 2016 21:53:29 +0100 Subject: [PATCH] Fixed PROGMEM causing an exception on ESP8266 (issue #383) --- CHANGELOG.md | 1 + include/ArduinoJson/Internals/StringFuncs.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9f21ba1..90c39e44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ HEAD ---- * Made PROGMEM available on more platforms (issue #381) +* Fixed PROGMEM causing an exception on ESP8266 (issue #383) v5.7.1 ------ diff --git a/include/ArduinoJson/Internals/StringFuncs.hpp b/include/ArduinoJson/Internals/StringFuncs.hpp index 91404d4d..e32efae7 100644 --- a/include/ArduinoJson/Internals/StringFuncs.hpp +++ b/include/ArduinoJson/Internals/StringFuncs.hpp @@ -100,7 +100,7 @@ struct StringFuncs : StdStringFuncs {}; template <> struct StringFuncs { static bool equals(const __FlashStringHelper* str, const char* expected) { - return strcmp_P((PGM_P)str, expected) == 0; + return strcmp_P(expected, (PGM_P)str) == 0; } template