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

UwpList - BuildCapabilityMap parser bug #2

Closed
dmex opened this issue Mar 28, 2017 · 2 comments
Closed

UwpList - BuildCapabilityMap parser bug #2

dmex opened this issue Mar 28, 2017 · 2 comments

Comments

@dmex
Copy link
Contributor

dmex commented Mar 28, 2017

Hello,

The BuildCapabilityMap function in the UwpList project fails to parse the caps.txt file.

The .gitattributes file for this repository specifies "text=auto" and Github defaults to LF (\n) line endings for text files - this causes the BuildCapabilityMap function to fail parsing the caps.txt file since the line endings were changed from CRLF (\r\n) to LF (\n) when the code was committed.

You will need to change the BuildCapabilityMap function, line 150 from:
auto cr = ::strstr(caps, "\r\n");
To:
auto cr = ::strstr(caps, "\n");

And line 168 from:
caps = cr + 2;
To:
caps = cr + 1;

Otherwise anyone downloading the UwpList project won't be able to use it properly.

Since these are all Windows based tools and files, I highly suggest changing the .gitattributes file to use "text=crlf" and just re-commit the code to save time and prevent future issues.

@zodiacon
Copy link
Owner

Good catch. Why don't you submit a pull request? :)

@dmex dmex mentioned this issue Oct 9, 2017
@dmex
Copy link
Contributor Author

dmex commented Oct 9, 2017

Thanks for merging the patch, I'll close the ticket 👍

@dmex dmex closed this as completed Oct 9, 2017
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

No branches or pull requests

2 participants