diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-03-10 11:44:19 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-03-10 11:44:19 +0000 |
| commit | e747c494225ecd495f9d715b5acf3df03b0b1e6c (patch) | |
| tree | 1dd8efe669a7f1f1ec9f3fd4e26b79ce92a85dc4 /test/scroll.cxx | |
| parent | 7cad39d3ef4b0f6c5b6f026633f375bd54eaa7e4 (diff) | |
Use copy_label() instead of strdup() for button labels.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4102 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test/scroll.cxx')
| -rw-r--r-- | test/scroll.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/scroll.cxx b/test/scroll.cxx index 69016827a..eb1dc4200 100644 --- a/test/scroll.cxx +++ b/test/scroll.cxx @@ -105,7 +105,8 @@ int main(int argc, char** argv) { int n = 0; for (int y=0; y<16; y++) for (int x=0; x<5; x++) { char buf[20]; sprintf(buf,"%d",n++); - Fl_Button* b = new Fl_Button(x*75,y*25+(y>=8?5*75:0),75,25,strdup(buf)); + Fl_Button* b = new Fl_Button(x*75,y*25+(y>=8?5*75:0),75,25); + b->copy_label(buf); b->color(n); b->labelcolor(FL_WHITE); } |
