ArthurSonzogni / json-tui

A JSON terminal UI made in C++
MIT License
353 stars 16 forks source link

Integer overflow for big numbers in JSON #2

Closed Drarig29 closed 2 years ago

Drarig29 commented 2 years ago

I was working with Unix timestamps, and the displayed number is incorrect. It looks like an integer overflow.

{
  "big": 1640267163452
}

What is displayed:

{
  "big": -410343620
}
ArthurSonzogni commented 2 years ago

Interesting. I will take a look how to make nlohmann/json to return the right value as a string.

ArthurSonzogni commented 2 years ago

It has been fixed. Thanks for reporting this!