diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-01-15 21:23:26 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-01-15 21:23:26 +0100 |
| commit | dfaab4ae9004fa636bb11fdc4846a11a16e81ebb (patch) | |
| tree | f958ef65e4104c15f66a3e144776f41a95385f0e /src/Fl_Text_Display.cxx | |
| parent | 3265d439f351d3a4d48bb1f99047f24134f1e5aa (diff) | |
Fix uninitialized vars in calls to fl_clip_box() (issue #6)
The main fixes are only to avoid static code analyzer warnings reported
in issue #5, but there are also minor bug fixes included. These bug
fixes are more of theoretical concerns though.
Close #6.
Diffstat (limited to 'src/Fl_Text_Display.cxx')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 55cf709ed..863779254 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1,7 +1,7 @@ // // "$Id$" // -// Copyright 2001-2018 by Bill Spitzak and others. +// Copyright 2001-2020 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // @@ -3798,7 +3798,7 @@ void Fl_Text_Display::draw(void) { // draw all of the text if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_EXPOSE)) { //printf("drawing all text\n"); - int X, Y, W, H; + int X = 0, Y = 0, W = 0, H = 0; if (fl_clip_box(text_area.x, text_area.y, text_area.w, text_area.h, X, Y, W, H)) { // Draw text using the intersected clipping box... |
