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 version equality without micro version in prefilter #1131

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build/prefilter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ let rec process_line loc line =
if Str.string_match version_re ver_string 0 then
let ver_maj = int_of_string (Str.matched_group 1 ver_string) in
let ver_min = try int_of_string (Str.matched_group 3 ver_string) with _ -> 0 in
let ver_mic = try int_of_string (Str.matched_group 5 ver_string) with _ -> 0 in
(* ver_mic defaults to micro (not 0) such that ##V=4.4## still matches 4.04.2 *)
let ver_mic = try int_of_string (Str.matched_group 5 ver_string) with _ -> micro in
cmp (major*10000+minor*100+micro) (ver_maj*10000+ver_min*100+ver_mic)
else if ver_string = "multicore" then
cmp (if has_domains ~extra then 5 else major) 5
Expand Down
Loading