-
-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fix undefined behavior in sample_motifs(sample = NULL)
#1565
Conversation
Current Aviator status
This PR was closed without merging. If you still want to merge this PR, re-open it.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
This pull request failed to merge: some required checks failed. After you have resolved the problem, you should remove the Failed checks: Sanitizer |
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as.numeric(cut.prob), as.numeric(sample.size), sample | |
as.numeric(cut.prob), as.numeric(sample.size), if (!is.null(sample) as_igraph_vs(graph, sample)-1 else NULL |
I think the correct way to proceed is what I outline above. Can you change this before merging, @krlmlr ?
Please use #1568 instead. I marked this as draft for safety, to make sure you see this message. |
#15698 was merged, so closing this one. |
Closes #1564.