correct logic

This commit is contained in:
Jacob Gissinger
2023-05-19 22:27:28 -04:00
committed by GitHub
parent 0a45d1f9ac
commit ad7b27a67a

View File

@ -4089,10 +4089,10 @@ int Variable::special_function(char *word, char *contents, Tree **tree, Tree **t
print_var_error(FLERR, fmt::format("Invalid kind {} in label2type() in variable",kind),ivar);
}
if (strcmp(word,"label2type") == 0 && value == -1)
print_var_error(FLERR, fmt::format("Invalid {} type label {} in label2type() in variable",
kind, typestr), ivar);
else value = (value == -1) ? 0.0 : 1.0;
if (strcmp(word,"label2type")) == 0) {
if (value == -1) print_var_error(FLERR, fmt::format("Invalid {} type label {} in label2type() in variable",
kind, typestr), ivar);
} else value = (value == -1) ? 0.0 : 1.0;
// save value in tree or on argstack