mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-18 10:58:36 +00:00
regedit: fgetc() gets int, not char (Coverity).
This commit is contained in:
parent
d0bff37cb2
commit
62f270e269
|
@ -664,8 +664,11 @@ static void processRegLinesA(FILE *in, char* first_chars)
|
||||||
/* get a single line. note that `i' must be one past the last
|
/* get a single line. note that `i' must be one past the last
|
||||||
* meaningful character in `s' when this loop exits */
|
* meaningful character in `s' when this loop exits */
|
||||||
for(i = 0; i < size_to_get-1; ++i){
|
for(i = 0; i < size_to_get-1; ++i){
|
||||||
s[i] = fgetc(in);
|
int xchar;
|
||||||
if(s[i] == EOF){
|
|
||||||
|
xchar = fgetc(in);
|
||||||
|
s[i] = xchar;
|
||||||
|
if(xchar == EOF){
|
||||||
if(ferror(in)){
|
if(ferror(in)){
|
||||||
perror("While reading input");
|
perror("While reading input");
|
||||||
exit(IO_ERROR);
|
exit(IO_ERROR);
|
||||||
|
|
Loading…
Reference in a new issue