Skip to content

Fix snprintf buffer size in vtkParseHierarchy

David Gobbi requested to merge dgobbi/vtk:wrapper-sprintf-bufsize into master

The buffer returned by vtkParse_NewString(cache, l) has a length of l+1 to allow space for the null byte, and we must make sure that snprintf is given the buffer length, not the string length. This was causing failure of the Java wrappers, because snprintf was truncating the final character of some identifiers.

Merge request reports