mirror of https://github.com/arendst/Tasmota.git
Merge pull request #15893 from s-hadinger/berry_fix_crash_lt
Berry fix crash on ESP32 early revisions
This commit is contained in:
commit
5e1eead987
|
@ -114,7 +114,13 @@
|
|||
if (var_isint(a) && var_isint(b)) { \
|
||||
res = ibinop(op, a, b); \
|
||||
} else if (var_isnumber(a) && var_isnumber(b)) { \
|
||||
res = var2real(a) op var2real(b); \
|
||||
/* res = var2real(a) op var2real(b); */ \
|
||||
union bvaldata x, y; /* TASMOTA workaround for ESP32 rev0 bug */ \
|
||||
x.i = a->v.i;\
|
||||
if (var_isint(a)) { x.r = (breal) x.i; }\
|
||||
y.i = b->v.i;\
|
||||
if (var_isint(b)) { y.r = (breal) y.i; }\
|
||||
res = x.r op y.r; \
|
||||
} else if (var_isstr(a) && var_isstr(b)) { \
|
||||
bstring *s1 = var_tostr(a), *s2 = var_tostr(b); \
|
||||
res = be_strcmp(s1, s2) op 0; \
|
||||
|
|
Loading…
Reference in New Issue