sscanf broken for 64 bit numbers? Eh?

Yo,

How do I sccanf uint64_t data?

void setup() {
  Serial.begin(9600);
}

void loop() 
{
  auto buffer = "1337";
  uint64_t try_get_back_number;
  sscanf(buffer, "%llu", &try_get_back_number);
  Serial.println((int)try_get_back_number);//prints 514
}

Compared the C++

#include <iostream>

int main()
{
	const auto buffer = "1337";
	uint64_t try_get_back_number;
	std::sscanf(buffer, "%llu", &try_get_back_number);
	std::cout << static_cast<int>(try_get_back_number) << std::endl;
//prints 1337
}
  Serial.println((int)try_get_back_number);//prints 514

What on earth possessed you to cast the uint64_t to an int?

I don't think AVR-LibC supports '%llu' http://www.atmel.com/webdoc/avrlibcreferencemanual/group__avr__stdio_1ga67bae1ad3af79809fd770be392f90e21.html

You can print out the return value from sscanf() to get an idea of what went wrong. It should return 1 if your one format string was matched successfully. I suspect it will return 0 or -1 (EOF).