Skip to content

Correct for different line separators#1

Open
CodeSpoof wants to merge 1 commit intoHackerPoet:mainfrom
CodeSpoof:main
Open

Correct for different line separators#1
CodeSpoof wants to merge 1 commit intoHackerPoet:mainfrom
CodeSpoof:main

Conversation

@CodeSpoof
Copy link

Since UNIX-Systems only use LF for a line-break and Windows uses CRLF, std::getline handles the separator differently depending on the platform. This causes problems with wordlists formatted in Windows-style line-breaks when using them on UNIX-like systems.

This quick fix just removes the trailing CR left in line by std::getline if it exists.

Since UNIX-Systems only use LF for a line-break and Windows uses CRLF, std::getline handles the separator differently depending on the platform. This causes problems with wordlists formatted in Windows-style line-breaks when using them on UNIX-like systems
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.

1 participant