Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix queryktharr() return value/behaviour. (AMReX-Codes#4186)
Up to AMReX 24.07 (at least), ParmParse::queryktharr() used to return 0 if the given k (2nd parameter) was out of range. As of AMReX 24.10, this is not the case, and ppindex() attempts to access found->second.m_vals out-of-bounds, resulting in seg-fault/undefined behaviour. This PR reverts to the original behaviour, which is now consistent with the documentation for querykth() in AMReX_ParmParse.H. It also makes minor corrections to the associated comments to align with this behaviour.
- Loading branch information