mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:03:42 +03:00
mprintf: check fputc error rather than matching returned character
OS/400 ascii fputc wrapper deviates from the posix standard by the
fact that it returns the ebcdic encoding of the original ascii
character. Testing for a matching value for success will then always
fail.
This commit replaces the chariacter comparison by an explicit error
return check.
Follow-up to ef2cf58
Closes #13367
This commit is contained in:
parent
0469c68f49
commit
6e8a6039b8
1 changed files with 1 additions and 3 deletions
|
|
@ -1160,9 +1160,7 @@ static int fputc_wrapper(unsigned char outc, void *f)
|
||||||
int out = outc;
|
int out = outc;
|
||||||
FILE *s = f;
|
FILE *s = f;
|
||||||
int rc = fputc(out, s);
|
int rc = fputc(out, s);
|
||||||
if(rc == out)
|
return rc == EOF;
|
||||||
return 0;
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int curl_mprintf(const char *format, ...)
|
int curl_mprintf(const char *format, ...)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue