mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-27 19:57:38 +00:00
[Build] Fix sort custom vars on ESP8266
ESP8266 needs all return paths of the lambda function to be exactly the same type. Thus the `operator<` of `String` needs to be cast to a bool as it would otherwise be an `unsigned char` .
This commit is contained in:
@@ -57,7 +57,7 @@ void handle_sysvars() {
|
||||
const int32_t ai = a.toInt();
|
||||
const int32_t bi = b.toInt();
|
||||
|
||||
if (!ai && !bi) { return a < b; } // a..z
|
||||
if (!ai && !bi) { return !!(a < b); } // a..z , need to cast to bool for ESP8266
|
||||
|
||||
if (!ai) { return false; } // Alphanum after num
|
||||
return ai < bi; // Numerical order
|
||||
|
||||
Reference in New Issue
Block a user