vtkXMLShader.cxx places string terminator in incorrect position when reading shaders from files
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Under Windows with Microsoft Visual C++, vtkXMLShader places the string terminator '\0' in the incorrect place if CRLF line endings are used. Apparently, the ifstream.read() function converts two-byte CRLF line endings into a single-byte line ending. Thus, in the current code, the string terminator is placed beyond the end of the shader code, effectively leaving undefined character values in the shader code which causes the shader compiler to fail. I have attached a path file for a fix to this problem that places the string terminator in the correct position.