Fix error C3688 when compiling on Visual Studio 2015: invalid literal suffix 'PRId64'; literal operator or literal operator template 'operator ""PRId64' not found

This commit is contained in:
Jason Li
2017-03-24 14:53:25 +08:00
parent 4e673656a1
commit 0f81ecf5f4

View File

@@ -590,7 +590,7 @@ static int json_object_int_to_json_string(struct json_object* jso,
{
/* room for 19 digits, the sign char, and a null term */
static char sbuf[21];
snprintf(sbuf, sizeof(sbuf), "%"PRId64, jso->o.c_int64);
snprintf(sbuf, sizeof(sbuf), "%" PRId64, jso->o.c_int64);
return printbuf_memappend (pb, sbuf, strlen(sbuf));
}