Skip to content
Browse files

Fix for OTP releases that have weird version infos

  • Loading branch information...
1 parent 91dce2b commit 51d8ee8a0970c948ae4079fbf5b5cf77dbc29acc @kostis kostis committed Apr 23, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 write_compile_flags
View
5 write_compile_flags
@@ -44,6 +44,9 @@ main([OutFile]) ->
ok = file:close(Handle),
ok.
+%% the stupid try-catch construct below is due to e.g. the R15A
+%% release being denoted as having "5.9.pre" as version info :-(
-spec parse_version_string(string()) -> [non_neg_integer()].
parse_version_string(VerStr) ->
- [list_to_integer(S) || S <- string:tokens(VerStr, ".")].
+ [try list_to_integer(S)
+ catch _:_ -> 0 end || S <- string:tokens(VerStr, ".")].

0 comments on commit 51d8ee8

Please sign in to comment.
Something went wrong with that request. Please try again.