FLTK logo

Re: [MOD] STR #3519: Sometimes Segmentation fault when printing some Unicode char's

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.bugs  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [MOD] STR #3519: Sometimes Segmentation fault when printing some Unicode char's Albrecht Schlosser Apr 03, 2019  
 
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: https://www.fltk.org/str.php?L3519
Version: 1.3.4


Uploaded patch 'str_3519_v2_1.3.5.patch' is the equivalent patch for FLTK
1.3.5.


Link: https://www.fltk.org/str.php?L3519
Version: 1.3.4
diff --git src/Fl_PostScript.cxx src/Fl_PostScript.cxx
index de7de89c9..73165e7c8 100644
--- src/Fl_PostScript.cxx
+++ src/Fl_PostScript.cxx
@@ -1077,7 +1077,7 @@ void Fl_PostScript_Graphics_Driver::transformed_draw_extra(const char* str, int
 #endif
   Fl_Fontsize old_size = size();
   Fl_Font fontnum = Fl_Graphics_Driver::font();
-  int w_scaled =  (int)(w * (scale + 0.5));
+  int w_scaled = (int)(w * (scale + 0.5)) + 1;
   int h = (int)(height() * scale);
   // create an offscreen image of the string
   Fl_Color text_color = Fl_Graphics_Driver::color();
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.