diff --git a/src/nanosvg.h b/src/nanosvg.h index 4c03ee58..c3c3ceb2 100644 --- a/src/nanosvg.h +++ b/src/nanosvg.h @@ -1488,7 +1488,9 @@ static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str) static NSVGcoordinate nsvg__coord(float v, int units) { - NSVGcoordinate coord = {v, units}; + NSVGcoordinate coord ; + coord.value = v; + coord.units = units; return coord; } diff --git a/src/nanosvgrast.h b/src/nanosvgrast.h index b740c316..88205ec5 100644 --- a/src/nanosvgrast.h +++ b/src/nanosvgrast.h @@ -855,6 +855,7 @@ static int nsvg__cmpEdge(const void *p, const void *q) static NSVGactiveEdge* nsvg__addActive(NSVGrasterizer* r, NSVGedge* e, float startPoint) { NSVGactiveEdge* z; + float dxdy; if (r->freelist != NULL) { // Restore from freelist. @@ -866,7 +867,7 @@ static NSVGactiveEdge* nsvg__addActive(NSVGrasterizer* r, NSVGedge* e, float sta if (z == NULL) return NULL; } - float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0); + dxdy = (e->x1 - e->x0) / (e->y1 - e->y0); // STBTT_assert(e->y0 <= start_point); // round dx down to avoid going too far if (dxdy < 0)