From ac375ba28db67a7c8881d764f83984982f85d53c Mon Sep 17 00:00:00 2001 From: Mikko Mononen Date: Mon, 3 Nov 2014 19:00:22 +0200 Subject: [PATCH] Fix for issue #20 - yet another fix for path parsing, allow number to start with . --- src/nanosvg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nanosvg.h b/src/nanosvg.h index 5d8bafb..38f32f5 100644 --- a/src/nanosvg.h +++ b/src/nanosvg.h @@ -910,7 +910,7 @@ static const char* nsvg__getNextPathItem(const char* s, char* it) // Skip white spaces and commas while (*s && (nsvg__isspace(*s) || *s == ',')) s++; if (!*s) return s; - if (*s == '-' || *s == '+' || nsvg__isdigit(*s)) { + if (*s == '-' || *s == '+' || *s == '.' || nsvg__isdigit(*s)) { // sign if (*s == '-' || *s == '+') { if (i < 63) it[i++] = *s;