From 2a52efa7d4f6b0113cce31171933e83b729ae186 Mon Sep 17 00:00:00 2001 From: Rob Giseburt Date: Mon, 23 Jan 2017 17:05:35 -0600 Subject: [PATCH] =?UTF-8?q?Gcode=20wasn=E2=80=99t=20accepting=20+=20prefix?= =?UTF-8?q?=20for=20numbers.=20Fixed.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- g2core/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g2core/util.h b/g2core/util.h index 463569af..af2dbcb6 100644 --- a/g2core/util.h +++ b/g2core/util.h @@ -187,7 +187,7 @@ constexpr float c_atof_int_(char *&p_, int_type v_) { } // Start portion -constexpr float c_atof(char *&p_) { return (*p_ == '-') ? (c_atof_int_(++p_, 0) * -1.0) : (c_atof_int_(p_, 0)); } +constexpr float c_atof(char *&p_) { return (*p_ == '-') ? (c_atof_int_(++p_, 0) * -1.0) : ( (*p_ == '+') ? c_atof_int_(++p_, 0) : (c_atof_int_(p_, 0))); } // It's assumed that the string buffer contains at lest count_ non-\0 chars