Bug #2361
Wrong sending of decimal numbers using RSB send
Status: | Resolved | Start date: | 08/17/2015 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Moringen | % Done: | 100% | |
Category: | Common Lisp Tools | |||
Target version: | rsb-0.13 |
Description
Using RSB send tool to send some decimal numbers seems to actually be sending them without the first zeros after the coma.
For instance:
rsb-toolscl0.13 send -l/vol/toolkit/nightly/trusty/x86_64/successful/share/rst0.13/proto/stable/rst/math/VectorDouble.proto 'pb:.rst.math.VectorDouble:{data: [0.0,0.0001]}' 'spread:/my/scope'
will result in [0.0, 0.1]
Associated revisions
Fixed parsing decimals in float literals in common/protocol-buffer-payload.lisp
fixes #2361
The logic for parsing decimals in float literals was completely wrong.
- common/protocol-buffer-payload.lisp (parse-integer-literal): renamed
parse-{number -> integer}-literal
(parse-hex-literal): adapted
(parse-decimal-literal): likewise
(parse-octal-literal): likewise
(decimal-digit-char?): new function; predicate for decimal digit
(defrule float-decimals): new rule; parse decimals in float literals
(defrule float): use it - test/common/protocol-buffer-payload.lisp
(test protocol-buffer-payload-root::grammar/smoke): added cases
exercising decimals in float literals
History
#1 Updated by J. Moringen over 7 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset rsb-tools-cl|d87a70ba926beef9611abf3b9fdfb9302de78e76.