fix logic bug triggering failures to read files without UNITS: tag

This commit is contained in:
Axel Kohlmeyer
2020-06-26 07:21:10 -04:00
parent d4148b1b80
commit 24c3f1f752

View File

@ -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));