diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2025-03-16 16:21:55 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2025-03-16 16:21:55 +0100 |
| commit | 13a7073a1e007ce5b71ef70bced1a9b15158820d (patch) | |
| tree | e023cacc942e74dfc391276588f7cf152db4825c /src | |
| parent | b252e5e45cfd87da48133a3a52e3ac164759b231 (diff) | |
Fix font termination bug from 2e1730d2f0f1 (#1221)
See also #1223, and thanks to Gonzalo for finding it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx index f3fac4cfb..e901db971 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx @@ -110,7 +110,7 @@ enumcbw(CONST LOGFONTW *lpelf, if (!fn) return 1; fn[0] = ' '; dstlen = fl_utf8fromwc(fn+1, dstlen+1, (wchar_t*)lpelf->lfFaceName, lw); // convert the string - fn[dstlen] = 0; + fn[dstlen + 1] = 0; // skip if it is one of our built-in fonts for (int i = 0; i < FL_FREE_FONT; i++) { if (!strcmp(Fl::get_font_name((Fl_Font)i), fn+1)) { |
