diff --git a/src/write_coeff.cpp b/src/write_coeff.cpp index 19f512fab1..685afc3c39 100644 --- a/src/write_coeff.cpp +++ b/src/write_coeff.cpp @@ -154,8 +154,8 @@ void WriteCoeff::command(int narg, char **arg) // parse type number and skip over it int type = std::stoi(str); char *p = str; - while ((*p != '\0') && (*p == ' ')) ++p; - while ((*p != '\0') && isdigit(*p)) ++p; + while (*p == ' ') ++p; + while (isdigit(*p)) ++p; fprintf(two, "%s %d %s %s", coeff, type, section, p); utils::sfgets(FLERR, str, BUF_SIZE, one, file, error);