mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-10-18 07:02:28 +00:00
fixed potential crash when rendering SVG
This commit is contained in:
+4
-1
@@ -2128,11 +2128,14 @@ void dqi_poly::draw() {
|
||||
|
||||
#if CAP_SVG
|
||||
if(svg::in) {
|
||||
if(isize(glcoords) > POLYMAX) continue;
|
||||
|
||||
bool bad = false;
|
||||
for(int i=0; i<polyi; i++) if(isnan(glcoords[i][0]) || isnan(glcoords[i][1]) || isnan(glcoords[i][2])) bad = true;
|
||||
for(int i=0; i<isize(glcoords); i++) if(isnan(glcoords[i][0]) || isnan(glcoords[i][1]) || isnan(glcoords[i][2])) bad = true;
|
||||
if(bad) continue;
|
||||
|
||||
coords_to_poly();
|
||||
|
||||
color_t col = color;
|
||||
if(poly_flags & POLY_INVERSE) col = 0;
|
||||
if(poly_flags & POLY_TRIANGLES) {
|
||||
|
||||
Reference in New Issue
Block a user