mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
fread and fwrite use size_t, not int
This commit is contained in:
parent
ff004c4cf6
commit
0caa08defd
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…
Reference in a new issue