Fix sporadic floating point value comparison error.

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
This commit is contained in:
Albrecht Schlosser 2014-10-15 12:36:26 +00:00
parent 8c91c679e0
commit de1d03cd52

View File

@ -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;
}