fix a warning about %u not being the right format for size_t

This commit is contained in:
Enno Rehling 2012-06-02 10:44:37 -07:00
parent ab15f24241
commit 578334f2d0
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ static void txt_r_tok_buf(struct storage *store, char *result, size_t size)
char format[16]; char format[16];
if (result && size > 0) { if (result && size > 0) {
format[0] = '%'; format[0] = '%';
sprintf(format + 1, "%us", size); sprintf(format + 1, "%lus", (unsigned long)size);
fscanf((FILE *) store->userdata, format, result); fscanf((FILE *) store->userdata, format, result);
if (result[0] == NULL_TOKEN) { if (result[0] == NULL_TOKEN) {
result[0] = 0; result[0] = 0;