Skip to content

Commit

Permalink
Fix platforms with more than 3 segments in system info string
Browse files Browse the repository at this point in the history
  • Loading branch information
DitherWither committed Aug 22, 2024
1 parent ac946fe commit a88a833
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/platform_ffi.erl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ os() ->
Tokens = string:tokens(ArchitectureString, "-"),
unicode:characters_to_binary(
case length(Tokens) of
n when n >= 3 -> lists:nth(3, Tokens);
4 -> lists:nth(3, Tokens);
3 -> lists:nth(3, Tokens);
2 -> lists:nth(2, Tokens)
end
).
Expand Down

0 comments on commit a88a833

Please sign in to comment.