When using the C progress bar API it is possible to overflow the 32 bit int data type if you pass a value larger than can be stored in an int, e.g. more than 2147483647.
In my case I was trying to use the download progress bar type and simply passing the number of bytes read so far to cli_progress_set() with a ~ 3 Gb file.
Would it be possible for the functions accept a wider integer type like int64_t or size_t to avoid this issue for most real world integers?
When using the C progress bar API it is possible to overflow the 32 bit
intdata type if you pass a value larger than can be stored in anint, e.g. more than 2147483647.In my case I was trying to use the
downloadprogress bar type and simply passing the number of bytes read so far tocli_progress_set()with a ~ 3 Gb file.Would it be possible for the functions accept a wider integer type like
int64_torsize_tto avoid this issue for most real world integers?