File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1090,7 +1090,7 @@ namespace lgfx
10901090 float fmidy = midy*hratio;
10911091 float hyp0 = pixelDistance ( midx, midy, 0 , 0 );
10921092
1093- rgb888_t scanline[w] ;
1093+ auto scanline = ( rgb888_t *) alloca (w * sizeof ( rgb888_t )) ;
10941094
10951095 startWrite ();
10961096 for ( int _y=0 ;_y<h;_y++ ) {
@@ -1117,7 +1117,7 @@ namespace lgfx
11171117 if ( !gradient.colors || gradient.count ==0 ) return ;
11181118 bool is_vertical = style==VLINEAR;
11191119 const uint32_t gradient_len = is_vertical ? h : w;
1120- rgb888_t scanline[ gradient_len] ;
1120+ auto scanline = ( rgb888_t *) alloca ( gradient_len * sizeof ( rgb888_t )) ;
11211121 for (int i=0 ;i<gradient_len;i++) { // memoize one gradient scanline
11221122 scanline[i] = map_gradient ( i, 0 , gradient_len, gradient );
11231123 }
You can’t perform that action at this time.
0 commit comments