diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-27 10:43:05 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-27 10:43:05 +0000 |
| commit | d97c1c14b7f62fffc1ce54d4ff3354a5ee21743f (patch) | |
| tree | 1adf0e6be133132685ba81a251f94a6e3dad379a /examples | |
| parent | 270eea5e23e3aeaa93aa0b483cba76cfee1f0df9 (diff) | |
Fix segfault caused in 'dfs.zc'
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/algorithms/dfs.zc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/algorithms/dfs.zc b/examples/algorithms/dfs.zc index 2d4670c..e51acfa 100644 --- a/examples/algorithms/dfs.zc +++ b/examples/algorithms/dfs.zc @@ -32,7 +32,7 @@ impl Graph { visited[vertex] = true; order.push(vertex); - let neighbors = self.adj_list.data[vertex]; + let neighbors = self.adj_list.get_ref(vertex); let neighbor_count = (int)neighbors.len; for i in 0..neighbor_count { let neighbor = neighbors.data[i]; @@ -83,7 +83,7 @@ impl Graph { visited.data[vertex] = true; order.push(vertex); - let neighbors = self.adj_list.data[vertex]; + let neighbors = self.adj_list.get_ref(vertex); let i = (int)neighbors.len - 1; while i >= 0 { let neighbor = neighbors.data[i]; |
