mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 03:51:50 +00:00
fread and fwrite use size_t, not int
This commit is contained in:
parent
7201e165a4
commit
848a144956
1 changed files with 3 additions and 3 deletions
|
|
@ -2498,16 +2498,16 @@ static void Shittylogcopy(void)
|
|||
{
|
||||
char buf[8192];
|
||||
FILE *fp;
|
||||
int n;
|
||||
size_t r;
|
||||
if (fseek(logstream, 0, SEEK_SET) == -1)
|
||||
{
|
||||
Shittycopyerror("fseek");
|
||||
}
|
||||
else if (( fp = fopen(logfilename, "wt") ))
|
||||
{
|
||||
while (( n = fread(buf, 1, sizeof buf, logstream) ))
|
||||
while (( r = fread(buf, 1, sizeof buf, logstream) ))
|
||||
{
|
||||
if (fwrite(buf, 1, n, fp) < n)
|
||||
if (fwrite(buf, 1, r, fp) < r)
|
||||
{
|
||||
Shittycopyerror("fwrite");
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue