fix ei_x_format to handle unary numeric operators

Steve Vinoski <>
Wed Oct 6 17:54:09 CEST 2010


Passing a negative numeric constant or a positive constant with an
explicit leading plus sign within the format string to ei_x_format or
ei_x_format_wo_ver failed due to the number parser not handling the
unary operators. This patch fixes that and includes an augmented unit
test that catches the problem.

git fetch git://github.com/vinoski/otp.git ei-number-parsing

Simon Hillerbring found this problem by noticing that this failed:

erl_call -c COOKIE -sname  -a 'erlang integer_to_list [-1]'

See the original erlang-questions thread here:

<http://www.erlang.org/cgi-bin/ezmlm-cgi?4:sss:53710:201010:dlmnaoopnigflbfhnjbe#b>

--steve


More information about the erlang-patches mailing list