Fixed PROGMEM causing an exception on ESP8266 (issue #383)

This commit is contained in:
Benoit Blanchon
2016-11-23 21:53:29 +01:00
parent 4a7232ac99
commit 2f7232859e
2 changed files with 2 additions and 1 deletions

View File

@ -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
------

View File

@ -100,7 +100,7 @@ struct StringFuncs<std::string> : StdStringFuncs<std::string> {};
template <>
struct StringFuncs<const __FlashStringHelper*> {
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 <typename Buffer>