Issue #23: fix for read-past-end in number parsing