summaryrefslogtreecommitdiffhomepage
path: root/examples/stc_astar.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stc_astar.c')
-rw-r--r--examples/stc_astar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/stc_astar.c b/examples/stc_astar.c
index 6421693a..91d475e9 100644
--- a/examples/stc_astar.c
+++ b/examples/stc_astar.c
@@ -103,7 +103,7 @@ astar(cstr maze, int width)
int new_cost = *csmap_mc_at(&cost_so_far, current);
if (maze.str[mpoint_index(&next)] != '#')
{
- csmap_mc_value_t* cost = csmap_mc_find(&cost_so_far, next);
+ csmap_mc_value_t* cost = csmap_mc_find(&cost_so_far, next).ref;
if (!cost || new_cost < cost->second)
{
csmap_mc_put(&cost_so_far, next, new_cost); // update (put)