regedit: fgetc() gets int, not char (Coverity).

oldstable
Marcus Meissner 2011-02-23 17:20:43 +01:00 committed by Alexandre Julliard
parent d0bff37cb2
commit 62f270e269
1 changed files with 5 additions and 2 deletions

View File

@ -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
* meaningful character in `s' when this loop exits */
for(i = 0; i < size_to_get-1; ++i){
s[i] = fgetc(in);
if(s[i] == EOF){
int xchar;
xchar = fgetc(in);
s[i] = xchar;
if(xchar == EOF){
if(ferror(in)){
perror("While reading input");
exit(IO_ERROR);