fix logic bug triggering failures to read files without UNITS: tag
This commit is contained in:
@ -1026,7 +1026,7 @@ FILE *Force::open_potential(const char *name, int *auto_convert)
|
||||
}
|
||||
|
||||
if (auto_convert == nullptr) {
|
||||
if (units != unit_style) {
|
||||
if (!units.empty() && (units != unit_style)) {
|
||||
error->one(FLERR, fmt::format("Potential file {} requires {} units "
|
||||
"but {} units are in use", name, units,
|
||||
unit_style));
|
||||
|
||||
Reference in New Issue
Block a user