We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7be0931 + afcb6ac commit 66d12f9Copy full SHA for 66d12f9
builtin/apply.c
@@ -1041,15 +1041,17 @@ static int gitdiff_renamedst(const char *line, struct patch *patch)
1041
1042
static int gitdiff_similarity(const char *line, struct patch *patch)
1043
{
1044
- if ((patch->score = strtoul(line, NULL, 10)) == ULONG_MAX)
1045
- patch->score = 0;
+ unsigned long val = strtoul(line, NULL, 10);
+ if (val <= 100)
1046
+ patch->score = val;
1047
return 0;
1048
}
1049
1050
static int gitdiff_dissimilarity(const char *line, struct patch *patch)
1051
1052
1053
1054
1055
1056
1057
0 commit comments