1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 12:34:27 +00:00

Fixed API timeval formatting again. Use of snprintf() causes problems in MSVS.

This commit is contained in:
unknown 2014-03-15 12:45:40 +01:00
parent b80f6c273f
commit 6b0b424c0a

2
api.c
View File

@ -1005,7 +1005,7 @@ static struct api_data *print_data(struct api_data *root, char *buf, bool isjson
sprintf(buf, "%s", *((bool *)(root->data)) ? TRUESTR : FALSESTR);
break;
case API_TIMEVAL:
snprintf(buf, sizeof(buf), "%"PRIu64".%06lu",
sprintf(buf, "%"PRIu64".%06lu",
(uint64_t)((struct timeval *)(root->data))->tv_sec,
(unsigned long)((struct timeval *)(root->data))->tv_usec);
break;