cogenda / Genius-TCAD-Open

Open-source version of the Genius Semiconductor Device Simulator
http://www.cogenda.com
Other
122 stars 70 forks source link

cgns io label length incorrect #15

Closed lutherthecat closed 11 years ago

lutherthecat commented 11 years ago

In cgns_io.cc the string buffer lengths are 32. They need to be 33 in order to capture the null termination character:

http://www.grc.nasa.gov/WWW/cgns/CGNS_docs_current/midlevel/general.html

Character Strings

All data structure names and labels in CGNS are limited to 32 characters. When reading a file, it is advised to pre-allocate the character string variables to 32 characters in Fortran, and 33 in C (to include the string terminator).