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

fix ncuriparse error,Correctly remove leading and trailing whitespace #2971

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

ShawayL
Copy link
Contributor

@ShawayL ShawayL commented Aug 10, 2024

fix ncuriparse error,Correctly remove leading and trailing whitespace.
When I use netcdf-c to connect to the nc file at the following path (D:/文档/test.nc), netcdf-c prompts me with a parameter error. After my investigation, I found that the error is caused by the ncuriparse function incorrectly interpreting the file path as a URI.

@CLAassistant
Copy link

CLAassistant commented Aug 10, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@DennisHeimbigner DennisHeimbigner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this line:
while(*(q - 1) == ' ' && (q - 1) >= uri) q--;
be
while((q - 1) >= uri && *(q - 1) == ' ') q--;

@ShawayL
Copy link
Contributor Author

ShawayL commented Aug 11, 2024

Shouldn't this line: be while(*(q - 1) == ' ' && (q - 1) >= uri) q--; while((q - 1) >= uri && *(q - 1) == ' ') q--;

Thank you. I have fixed the issue.

@WardF WardF merged commit 3ae2f29 into Unidata:main Aug 13, 2024
107 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants