Skip to content

Commit

Permalink
Fix: recover the use of -1 value of out_chg (#5540)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirk0830 authored Nov 20, 2024
1 parent 0ecfbc4 commit 20b2214
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/module_io/read_input_item_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void ReadInput::item_output()
{
ModuleBase::WARNING_QUIT("ReadInput", "out_chg should have 1 or 2 values");
}
para.input.out_chg[0] = assume_as_boolean(item.str_values[0]);
para.input.out_chg[0] = (item.str_values[0] == "-1")? -1: assume_as_boolean(item.str_values[0]);
para.input.out_chg[1] = (count == 2) ? std::stoi(item.str_values[1]) : 3;
};
item.reset_value = [](const Input_Item& item, Parameter& para) {
Expand Down

0 comments on commit 20b2214

Please sign in to comment.