From fbf5e14890dba16bb50e3ac00829564a0d6fb04f Mon Sep 17 00:00:00 2001 From: Nick Christofides <118103879+NicChr@users.noreply.github.com> Date: Mon, 8 Apr 2024 12:35:51 +0100 Subject: [PATCH] Moved protection up 1 line. --- src/sset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sset.cpp b/src/sset.cpp index 4a78c55..1359442 100644 --- a/src/sset.cpp +++ b/src/sset.cpp @@ -646,8 +646,8 @@ SEXP cpp_sset_df(SEXP x, SEXP indices){ cpp11::function cheapr_sset = cpp11::package("cheapr")["sset"]; const SEXP *p_x = VECTOR_PTR_RO(x); SEXP out = Rf_protect(Rf_allocVector(VECSXP, ncols)); - SEXP *p_out = VECTOR_PTR(out); ++n_protections; + SEXP *p_out = VECTOR_PTR(out); // Counting the number of: // Zeroes // Out-of-bounds indices