stb_truetype: GCC warning fix

GCC warns about a potentially uninitialized variable here. It's
not (or at least I don't see how), but fix it anyway.
This commit is contained in:
Fabian Giesen 2021-07-07 02:45:41 -07:00
parent db6e91b7d8
commit e590505492

View File

@ -4624,7 +4624,8 @@ STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float sc
float ax = x1-x0, ay = y1-y0;
float bx = x0 - 2*x1 + x2, by = y0 - 2*y1 + y2;
float mx = x0 - sx, my = y0 - sy;
float res[3],px,py,t,it,dist2;
float res[3] = {0.f,0.f,0.f};
float px,py,t,it,dist2;
float a_inv = precompute[i];
if (a_inv == 0.0) { // if a_inv is 0, it's 2nd degree so use quadratic formula
float a = 3*(ax*bx + ay*by);