From de1efa2c8848985e943064a9595ad92b98325e56 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Mon, 23 Oct 2023 15:49:07 -0700 Subject: [PATCH] Fix CRAN clang-UBSAN error --- R/predict.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/predict.R b/R/predict.R index 28ff3ac24..f81352ad4 100644 --- a/R/predict.R +++ b/R/predict.R @@ -422,7 +422,7 @@ predict.sdmTMB <- function(object, newdata = NULL, proj_mesh <- object$spde$A_st # fake newdata[[xy_cols[1]]] <- NA_real_ # fake newdata[[xy_cols[2]]] <- NA_real_ # fake - newdata[["sdm_spatial_id"]] <- NA_integer_ # fake + newdata[["sdm_spatial_id"]] <- rep(0L, nrow(newdata)) # fake } if (length(object$formula) == 1L) {