Skip to content

Commit

Permalink
Fix CRAN clang-UBSAN error
Browse files Browse the repository at this point in the history
  • Loading branch information
seananderson committed Oct 23, 2023
1 parent 95d9f88 commit de1efa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/predict.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit de1efa2

Please sign in to comment.