Skip to content

Commit d240679

Browse files
The9CatCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent fdb16ed commit d240679

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

utils/Test/testEmp.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ int main(int argc, char* argv[])
275275
EmpDeproj E(H, Rmin, Rmax, NumR, Nint, SigmaZFunc, type_enum);
276276

277277
// radial evaluation points
278+
if (Nr < 2) {
279+
throw std::runtime_error("Nr must be at least 2 (received " + std::to_string(Nr) + ")");
280+
}
278281
std::vector<double> r_eval;
279282
for (int i = 0; i < Nr; ++i) {
280283
double t = (double)i / (Nr - 1);

0 commit comments

Comments
 (0)