Font_StringWidth: Fix me being tired and not returning anything valid in this

This commit is contained in:
Marco Cawthorne 2022-01-31 16:21:09 -08:00
parent 5a3f59a24c
commit 155b8c343b
Signed by: eukara
GPG key ID: C196CD8BA993248A

View file

@ -156,8 +156,10 @@ Font_GetHeight(font_s fnt)
float
Font_StringWidth(string strText, float flColors, font_s fnt)
{
float w;
drawfont = (float)fnt.iID;
stringwidth(strText, flColors, [(float)fnt.iScaleX,(float)fnt.iScaleY]);
w = stringwidth(strText, flColors, [fnt.iScaleX, fnt.iScaleY]);
drawfont = 0;
drawfontscale = [1,1,0];
return w;
}