Sending a Long through terminal widget?

I would like to send a large value (like this big: 1023095075) through the terminal widget and be able to use it as an unsigned long in my code… But it doesn’t seem to be working when I go beyond 5 digits…

If I send 12300, I get “12” in my display widget, but if I send 123001, I get “-3041”

Any thoughts on how to overcome?

WidgetTerminal terminal(V1);

char auth[] = "xxx";

BLYNK_WRITE(V1)
{
unsigned long termInput = param.asInt();

int b = (termInput/1000);

Blynk.virtualWrite(2, b);  //Sends to a display widget

terminal.flush();

}

Hi,

unsigned long termInput = param.asInt();

is this correct? asInt ? You get Integer. Maybe long?

Greetz, Bernd

Yes!

Thank you @bernd331. That was the solution.

@Dmitriy when are we going to be able to send energy as gratitude to fellow Blynkers? (<< idea suggestion)