Berry fix add for int+float

This commit is contained in:
Stephan Hadinger 2022-01-11 17:29:08 +01:00
parent 6735c0c3fd
commit 4121eab041
1 changed files with 2 additions and 0 deletions

View File

@ -598,7 +598,9 @@ newframe: /* a new call frame */
} else if (var_isnumber(a) && var_isnumber(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; }
// breal x = var2real(a), y = var2real(b);
var_setreal(dst, x.r + y.r);
} else if (var_isstr(a) && var_isstr(b)) { /* strcat */