From b379b054eaff6ee0bcfc6650747f4a4592e581ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Wed, 30 Oct 2024 21:58:27 +0100 Subject: [PATCH] fix: Fix undefined behavior in `sample_motifs(sample = NULL)` --- R/motifs.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/motifs.R b/R/motifs.R index 993a689c200..41949af66e9 100644 --- a/R/motifs.R +++ b/R/motifs.R @@ -229,7 +229,7 @@ sample_motifs <- function(graph, size = 3, cut.prob = rep(0, size), on.exit(.Call(R_igraph_finalizer)) .Call( R_igraph_motifs_randesu_estimate, graph, as.numeric(size), - as.numeric(cut.prob), as.numeric(sample.size), as.numeric(sample) + as.numeric(cut.prob), as.numeric(sample.size), sample ) }