Problem with Particle.variable format by 0.5.0-rc1

I noticed a problem with new firmware.
This format gives strange results:
Particle.variable(“startstate”, startstate);
This format works great:
Particle.variable(“startstate”, &startstate, INT);

More details please! What’s the type of variable you’re passing in? What’s strange about the results?

To reproduce this here is a simple example.

int startstate = 0;

void setup ()
{

//Particle.variable("startstate ", & Startstate, INT);
Particle.variable ( "startstate", startstate);

}

void loop ()
{


}

I get the following result instead of zero.
{cmd: “VarReturn”, name: “startstate”, result: 134498903,…}
cmd
:
"VarReturn"
coreInfo
:
{last_app: “”, last_heard: “2016-04-07T18:45:34.509Z”, connected: true,…}
name
:
"startstate"
result
:
134498903

Thanks! Confirmed this is an issue in 0.5.0-rc.1

1 Like

There is a workaround, described in the issue.