]> sigrok.org Git - libsigrok.git/commit - src/strutil.c
strutil: Correctly parse floating point frequencies in parse_size_string().
authorpoljar (Damir Jelić) <redacted>
Thu, 16 Jan 2014 01:53:40 +0000 (02:53 +0100)
committerBert Vermeulen <redacted>
Thu, 16 Jan 2014 08:35:38 +0000 (09:35 +0100)
commit580f309948b1540a32cb1fd787ae3599c68cae4b
tree17a9710a6de3a6623607064459756e514373125c
parent0b92c32cb87f48d5f378b64c787a6f25b65915ad
strutil: Correctly parse floating point frequencies in parse_size_string().

parse_size_string() incorrectly parses a real number, e.g. 1.5 kHz ends up
being 1Hz.

This patch fixes parse_size_string() to take the fractional part as well into
account. The fractional part is parsed as an double precision floating point
number while ignoring the locale.
strutil.c