diff --git a/Tests/SystemInformation/DumpInformation.cxx b/Tests/SystemInformation/DumpInformation.cxx index ab4522809..bb5a64963 100644 --- a/Tests/SystemInformation/DumpInformation.cxx +++ b/Tests/SystemInformation/DumpInformation.cxx @@ -11,7 +11,11 @@ int main(int, char*[]) } while(!feof(file)) { - putc(fgetc(file), stdout); + int ch = fgetc(file); + if(ch != EOF) + { + putc(ch, stdout); + } } fclose(file); return 0;