summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_File_Chooser.cxx2
-rw-r--r--src/Fl_File_Chooser.fl2
-rw-r--r--src/Fl_Valuator.cxx1
-rw-r--r--src/fl_draw_pixmap.cxx17
4 files changed, 12 insertions, 10 deletions
diff --git a/src/Fl_File_Chooser.cxx b/src/Fl_File_Chooser.cxx
index ba54213bd..356e97dde 100644
--- a/src/Fl_File_Chooser.cxx
+++ b/src/Fl_File_Chooser.cxx
@@ -359,7 +359,7 @@ const char * Fl_File_Chooser::label() {
void Fl_File_Chooser::ok_label(const char *l) {
okButton->label(l);
-int w, h;
+int w=0, h=0;
okButton->measure_label(w, h);
okButton->resize(cancelButton->x() - 50 - w, cancelButton->y(),
w + 40, 25);
diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl
index 982811bae..8cbd9f588 100644
--- a/src/Fl_File_Chooser.fl
+++ b/src/Fl_File_Chooser.fl
@@ -283,7 +283,7 @@ showChoiceCB();} {}
Function {ok_label(const char *l)} {return_type void
} {
code {okButton->label(l);
-int w, h;
+int w=0, h=0;
okButton->measure_label(w, h);
okButton->resize(cancelButton->x() - 50 - w, cancelButton->y(),
w + 40, 25);
diff --git a/src/Fl_Valuator.cxx b/src/Fl_Valuator.cxx
index d08813651..296951022 100644
--- a/src/Fl_Valuator.cxx
+++ b/src/Fl_Valuator.cxx
@@ -38,6 +38,7 @@ Fl_Valuator::Fl_Valuator(int X, int Y, int W, int H, const char* L)
align(FL_ALIGN_BOTTOM);
when(FL_WHEN_CHANGED);
value_ = 0;
+ previous_value_ = 1;
min = 0;
max = 1;
A = 0.0;
diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx
index 20cc293c0..a1fb81d8a 100644
--- a/src/fl_draw_pixmap.cxx
+++ b/src/fl_draw_pixmap.cxx
@@ -263,15 +263,16 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
for (int Y = 0; Y < d.h; Y++) {
const uchar* p = data[Y];
if (chars_per_pixel <= 1) {
+ int dw = d.w;
for (int X = 0; X < W; X++) {
- uchar b = (*p++ != transparent_index);
- if (*p++ != transparent_index) b |= 2;
- if (*p++ != transparent_index) b |= 4;
- if (*p++ != transparent_index) b |= 8;
- if (*p++ != transparent_index) b |= 16;
- if (*p++ != transparent_index) b |= 32;
- if (*p++ != transparent_index) b |= 64;
- if (*p++ != transparent_index) b |= 128;
+ uchar b = (dw-->0 && *p++ != transparent_index);
+ if (dw-->0 && *p++ != transparent_index) b |= 2;
+ if (dw-->0 && *p++ != transparent_index) b |= 4;
+ if (dw-->0 && *p++ != transparent_index) b |= 8;
+ if (dw-->0 && *p++ != transparent_index) b |= 16;
+ if (dw-->0 && *p++ != transparent_index) b |= 32;
+ if (dw-->0 && *p++ != transparent_index) b |= 64;
+ if (dw-->0 && *p++ != transparent_index) b |= 128;
*bitmap++ = b;
}
} else {