diff --git a/src/nanosvg.h b/src/nanosvg.h index 93454160..e58ea5ca 100644 --- a/src/nanosvg.h +++ b/src/nanosvg.h @@ -1296,7 +1296,7 @@ static unsigned int nsvg__parseColorRGB(const char* str) while (*str && nsvg__isdigit(*str)) str++; // skip fractional part } if (*str == '%') str++; else break; - while (nsvg__isspace(*str)) str++; + while (*str && nsvg__isspace(*str)) str++; if (*str == delimiter[i]) str++; else break; }