diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-01-26 15:23:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-26 15:23:43 +0100 |
| commit | 179771acd25ee5ff8e36a5fd192682d4d55c52af (patch) | |
| tree | f7d32685bccef27e64a6f706e7c0e0c9d099c372 /src/drivers/Xlib | |
| parent | f314ca75feab8c472a9b136fd25636d2d2da68a7 (diff) | |
Fixing FLUID file corruption from issue #653 (#662)
Removing all globals in file writer (#653 )
Fix some static analyser complaints
Valgrind: handle width==0 in GfxDrivers on Wayland and X11
Don't use `Fl_Input_::static_value`, it accesses previous
buffer that may be deleted
Project file write encapsulated, removing globals
Encapsulating project file reader, removing states in glbals
Project i/o increased source code readability
Diffstat (limited to 'src/drivers/Xlib')
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx index ea04ca561..9fc98f0dd 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx @@ -1273,6 +1273,7 @@ double Fl_Xlib_Graphics_Driver::width_unscaled(unsigned int utf32) { } double Fl_Xlib_Graphics_Driver::width_unscaled(const char* str, int n) { + if ((str == NULL) || (n == 0)) return 0.; if (n == fl_utf8len(*str)) { // str contains a single unicode character int l; unsigned c = fl_utf8decode(str, str+n, &l); |
