Skip to content

Commit

Permalink
EXODUS: Fix bad handling of user-defined suffices
Browse files Browse the repository at this point in the history
  • Loading branch information
gsjaardema committed Sep 28, 2023
1 parent fad0e9a commit 1d8df99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/seacas/libraries/exodus/src/ex_field_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ const char *ex_field_component_suffix(ex_field *field, int nest_level, int compo
}

case EX_FIELD_TYPE_USER_DEFINED: {
if (&field->suffices[nest_level] != NULL) {
if (field->suffices[0] != '\0') {
// `user_suffices` is a comma-separated string. Assume component is valid.
char *string = strdup(&field->suffices[nest_level]);
char *string = strdup(field->suffices);
char *tofree = string;
char *token = strsep(&string, ",");
for (int i = 0; i < component - 1; i++) {
Expand Down

0 comments on commit 1d8df99

Please sign in to comment.