We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbb0fa8 commit 153bd6aCopy full SHA for 153bd6a
1 file changed
src/apis/api_watch.erl
@@ -489,7 +489,7 @@ bin_to_float(Binary) ->
489
%% 添加小数点以确保有效的浮点数表示
490
%% @end
491
add_decimal_point(List) when erlang:is_list(List) ->
492
- case lists:last(List) of
493
- X when X >= $0, X =< $9 -> lists:append(List, ".0");
494
- _ -> List
+ case lists:member($., List) of
+ true -> List;
+ _ -> lists:append(List, ".0")
495
end.
0 commit comments