Skip to content

Commit

Permalink
Fix sporadic floating point value comparison error.
Browse files Browse the repository at this point in the history
I wonder why this did not appear earlier. I found this issue only
when compiling with Cygwin under certain circumstances. Error was:

  Generating tabs.cxx and header from tabs.fl...
  tabs.fl:2: unknown version '1.0303'

although fluid was the one linked under FLTK 1.3.3 in the build process.
The fix is to adjust FL_VERSION by a delta value of 0.00001.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10380 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Albrecht Schlosser committed Oct 15, 2014
1 parent 8c91c67 commit de1d03c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fluid/file.cxx
Expand Up @@ -379,7 +379,7 @@ static void read_children(Fl_Type *p, int paste) {
if (!strcmp(c,"version")) {
c = read_word();
read_version = strtod(c,0);
if (read_version<=0 || read_version>FL_VERSION)
if (read_version<=0 || read_version>double(FL_VERSION+0.00001d))
read_error("unknown version '%s'",c);
continue;
}
Expand Down

0 comments on commit de1d03c

Please sign in to comment.