UrbanAnalyst / dodgr

Distances on Directed Graphs in R
https://urbananalyst.github.io/dodgr/
127 stars 16 forks source link

segfault in dodgr_paths #148

Closed dcooley closed 3 years ago

dcooley commented 3 years ago

When using dodgr_paths(..., pairwise = TRUE) on length-1 from/to vectors we get a segfault

(This example causes a crash)

graph <- weight_streetnet (hampi)
from <- graph$from_id[1234]
to <- graph$to_id[4321]

dp <- dodgr_paths (graph, from = from, to = to, pairwise = TRUE)

I think this

for (i in seq (from_index))

should be

for (i in seq_along (from_index))
mpadge commented 3 years ago

Yep, that was it alright. Thanks!