Skip to content

Commit

Permalink
Use long long for IParser value_t in ParmParse (AMReX-Codes#4059)
Browse files Browse the repository at this point in the history
AMReX-Codes#4046 changed the type of IParser from int to long long, however
in pp_make_parser it was still cast to int which can cause an
overflow.  
  • Loading branch information
AlexanderSinn authored Aug 1, 2024
1 parent 3e93ef7 commit 4434048
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/Base/AMReX_ParmParse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ PARSER_t
pp_make_parser (std::string const& func, Vector<std::string> const& vars,
ParmParse::Table const& table, std::string const& parser_prefix)
{
using value_t = std::conditional_t<std::is_integral_v<T>, int, double>;
using value_t = std::conditional_t<std::is_integral_v<T>, long long, double>;

std::vector<std::string> prefixes;
prefixes.reserve(3);
Expand Down

0 comments on commit 4434048

Please sign in to comment.