Skip to content

Commit

Permalink
Merge branch 'rchk-protect-stack' into rchk-gha
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Jul 22, 2024
2 parents 1fea14e + c2aa752 commit 9eb49ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gsumm.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ SEXP gmean(SEXP x, SEXP narmArg)
x = PROTECT(coerceVector(x, REALSXP)); protecti++;
case REALSXP: {
if (INHERITS(x, char_integer64)) {
x = PROTECT(coerceAs(x, /*as=*/PROTECT(ScalarReal(1)), /*copyArg=*/ScalarLogical(TRUE))); protecti++;
UNPROTECT(1); // as= input to coerceAs()
SEXP as = PROTECT(ScalarReal(1));
x = PROTECT(coerceAs(x, as, /*copyArg=*/ScalarLogical(TRUE))); protecti+=2;
}
const double *restrict gx = gather(x, &anyNA);
ans = PROTECT(allocVector(REALSXP, ngrp)); protecti++;
Expand Down

0 comments on commit 9eb49ff

Please sign in to comment.