Skip to content

Commit

Permalink
Fixed array_name() bug - now correctly handles arrays in different cl…
Browse files Browse the repository at this point in the history
…asses

with the same name.


git-svn-id: file:///fltk/svn/fltk/trunk@308 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Feb 19, 1999
1 parent 1a135b0 commit b737731
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions fluid/Fl_Widget_Type.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Widget_Type.cxx,v 1.14 1999/01/13 15:53:57 mike Exp $"
// "$Id: Fl_Widget_Type.cxx,v 1.15 1999/02/19 16:21:50 mike Exp $"
//
// Widget type code for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -1168,7 +1168,11 @@ const char *array_name(Fl_Widget_Type *o) {
}
int num = atoi(d+1);
int sawthis = 0;
for (Fl_Type *t = Fl_Type::first; t; t = t->next) {
Fl_Type *t = o->prev;
Fl_Type *tp = o;
const char *cn = o->class_name();
for (; t && t->class_name() == cn; tp = t, t = t->prev);
for (t = tp; t && t->class_name() == cn; t = t->next) {
if (t == o) {sawthis=1; continue;}
const char *e = t->name();
if (!e) continue;
Expand Down Expand Up @@ -1701,5 +1705,5 @@ int Fl_Widget_Type::read_fdesign(const char* name, const char* value) {
}

//
// End of "$Id: Fl_Widget_Type.cxx,v 1.14 1999/01/13 15:53:57 mike Exp $".
// End of "$Id: Fl_Widget_Type.cxx,v 1.15 1999/02/19 16:21:50 mike Exp $".
//

0 comments on commit b737731

Please sign in to comment.