[vtkusers] a bug in void vtkXMLShader::ReadCodeFromFile(const char* filepath)
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Fri Mar 28 13:19:51 EDT 2008
Charlie,
Thanks for the patch. I've commited the fix to CVS.
charlie_zhang at moldflow.com wrote:
> Hi,
>
> I'm using the Cg/GLSL shader feature in VTK5.2 overnight build and come
> across a bug in vtkXMLShader::ReadCodeFromFile(const char* filepath).
>
> The issue is: if the file has carriage/return then the "this->Code" char[ ]
> always has some unwanted characters at its end.
>
> It turned out the length includes all the carriage/return, but when
> ifp.read(this->code,length) it stripped out all the carriage/return. To
> fix this issue I changed the "ifp.open( filepath)" to "ifp.open(filepath,
> ios::binary)" so the read() will read in the carriage/return as well.
>
>
> Charlie
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list