[erlang-bugs] erlang:binary_to_integer(<<"+">>) returns 0

-E:), niku niku@REDACTED
Thu Jul 30 19:40:42 CEST 2015


Hi folks.

erlang:binary_to_integer(<<"+">>) and
erlang:binary_to_integer(<<"-">>) return 0

I think it should cause exception same as erlang:list_to_integer("+").

Here is an example

$ erl
Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:4:4]
[async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Eshell V6.4  (abort with ^G)
1> binary_to_integer(<<"+">>).
0
2> binary_to_integer(<<"-">>).
0

regards.



More information about the erlang-bugs mailing list