diff --git a/.gitignore b/.gitignore index 319d66928..415bb9372 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ src/exp src/user/CylindricalDisk.cc src/user/EllipsoidForce.cc src/user/SLSphere.cc +_codeql_build_dir diff --git a/_codeql_detected_source_root b/_codeql_detected_source_root new file mode 120000 index 000000000..945c9b46d --- /dev/null +++ b/_codeql_detected_source_root @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/exputil/ExpDeproj.cc b/exputil/ExpDeproj.cc index 4e6a66b76..183711d6d 100644 --- a/exputil/ExpDeproj.cc +++ b/exputil/ExpDeproj.cc @@ -12,8 +12,8 @@ void ExpDeproj::initialize() { - if (ngrid <= 0) { - throw std::invalid_argument("n must be positive"); + if (ngrid < 2) { + throw std::invalid_argument("n must be at least 2"); } rv.resize(ngrid);