Skip to content

Incorrect arguments provided to the scoring function #1

Description

@Grobnar

Hi, I noticed the call to the scoring function in path_finder_find_step reverses the col and row arguments.

path_finder->f_score[n] = path_finder->f_score[n] + path_finder->score_func(path_finder, n / path_finder->cols, n % path_finder->cols, data);
Looks like it should be:
path_finder->f_score[n] = path_finder->f_score[n] + path_finder->score_func(path_finder, n % path_finder->cols, n / path_finder->cols, data);
Just switching the modulus and division.

As a sidenote, great work, I find your code really clean and simple and have been trying to model mine after it since using your library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions