mirror of https://github.com/arendst/Tasmota.git
Avoid random content in bvalue (#21846)
This commit is contained in:
parent
b8d7b5e2fa
commit
f97c47c511
|
@ -307,7 +307,7 @@ static int exp2const(bfuncinfo *finfo, bexpdesc *e)
|
|||
{
|
||||
int idx = findconst(finfo, e); /* does the constant already exist? */
|
||||
if (idx == -1) { /* if not add it */
|
||||
bvalue k;
|
||||
bvalue k = {};
|
||||
switch (e->type) {
|
||||
case ETINT:
|
||||
k.type = BE_INT;
|
||||
|
@ -882,7 +882,7 @@ void be_code_index(bfuncinfo *finfo, bexpdesc *c, bexpdesc *k)
|
|||
void be_code_class(bfuncinfo *finfo, bexpdesc *dst, bclass *c)
|
||||
{
|
||||
int src;
|
||||
bvalue var;
|
||||
bvalue var = {};
|
||||
var_setclass(&var, c); /* new var of CLASS type */
|
||||
src = newconst(finfo, &var); /* allocate a new constant and return kreg */
|
||||
if (dst->type == ETLOCAL) { /* if target is a local variable, just assign */
|
||||
|
@ -965,7 +965,7 @@ void be_code_raise(bfuncinfo *finfo, bexpdesc *e1, bexpdesc *e2)
|
|||
|
||||
void be_code_implicit_class(bfuncinfo *finfo, bexpdesc *e, bclass *c)
|
||||
{
|
||||
bvalue k;
|
||||
bvalue k = {};
|
||||
k.type = BE_CLASS;
|
||||
k.v.p = c;
|
||||
int idx = newconst(finfo, &k); /* create new constant */
|
||||
|
|
Loading…
Reference in New Issue