-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parsing of mode lines with trailing space (#38)
If a patch is passed through a system that converts line endings to '\r\n', mode lines end up with trailing whitespace that confuses strconv.ParseInt. In Git, this is avoided by using strtoul() for parsing, which stops at the first non-digit character. Changing line endings in patch content itself will cause other problems so it is best to avoid this transform, but if it does happen, it shouldn't cause a parse error.
- Loading branch information
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters