Skip to content
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

Is this a bug in g2c_compare.c? #515

Open
DusanJovic-NOAA opened this issue Sep 20, 2024 · 2 comments · May be fixed by #530
Open

Is this a bug in g2c_compare.c? #515

DusanJovic-NOAA opened this issue Sep 20, 2024 · 2 comments · May be fixed by #530
Assignees
Labels
bug Something isn't working

Comments

@DusanJovic-NOAA
Copy link
Contributor

In this section in g2c_compare.c:

 69     /* Open the two files. */
 70     g2c_set_log_level(10);
 71     if ((ret = g2c_open(path[0], G2C_NOWRITE, &g2cid0)))
 72         return ret;
 73     if ((ret = g2c_open(path[0], G2C_NOWRITE, &g2cid1)))
 74         return ret;

shouldn't the second file use path[1] instead of path[0]?

@DusanJovic-NOAA
Copy link
Contributor Author

$ ../NCEPLIBS-g2c/install/bin/g2c_compare
Segmentation fault (core dumped)

Running the program with no command line arguments should not segfault, it should print some kind of help/usage info.

@edwardhartnett edwardhartnett self-assigned this Sep 22, 2024
@edwardhartnett edwardhartnett added the bug Something isn't working label Sep 22, 2024
@edwardhartnett edwardhartnett linked a pull request Oct 18, 2024 that will close this issue
@edwardhartnett
Copy link
Contributor

Uggg! What a dumb bug.

I've fixed it in #530

Thanks @DusanJovic-NOAA for catching this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants