X-Git-Url: https://jasonwoof.com/gitweb/?p=st.git;a=blobdiff_plain;f=st.c;h=672c47af6c20f553f6c7b4e7d4c79d06b19f04b2;hp=9079834994c5aad8f164430e0d22aeac1377b845;hb=0e439e5624113233525266c2a104792f2c33b7e3;hpb=74962bf56636e608f0ee35f2076bc6b48923119d diff --git a/st.c b/st.c index 9079834..672c47a 100644 --- a/st.c +++ b/st.c @@ -2993,13 +2993,9 @@ xunloadfont(Font *f) { void xunloadfonts(void) { - int i; - /* Free the loaded fonts in the font cache. */ - for(i = 0; i < frclen; i++) { - XftFontClose(xw.dpy, frc[i].font); - } - frclen = 0; + while(frclen > 0) + XftFontClose(xw.dpy, frc[--frclen].font); xunloadfont(&dc.font); xunloadfont(&dc.bfont);