Skip to content

SEACAS: Fix copy_string; add new versions

James Willenbring requested to merge gsjaardema:seacas-fix-copy-string into develop

Created by: gsjaardema



Fixed some previous uses of the copy_string function(s) which were added to avoid issues with strncpy. There was some confusion as to the buffer size which was being passed in.

Added a couple additional versions of copy_string.

  • Automatically determine the size of the buffer to avoid issues mentioned above
  • Allow std::string to be copied from; avoid adding the .c_str() on several uses

Added exodus tests to make sure names were not being truncated.

Motivation and Context

How Has This Been Tested?


  • My commit messages mention the appropriate GitHub issue numbers.
  • My code follows the code style of the affected package(s).
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the code contribution guidelines for this project.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • No new compiler warnings were introduced.
  • These changes break backwards compatibility.

Merge request reports