Revision: 68975
http://sourceforge.net/p/brlcad/code/68975
Author: ejno
Date: 2016-10-03 23:51:18 +0000 (Mon, 03 Oct 2016)
Log Message:
-----------
only check errno if the return value of strtol()/strtod() is exactly 0.0
Modified Paths:
--------------
brlcad/trunk/src/libbu/color.c
Modified: brlcad/trunk/src/libbu/color.c
===================================================================
--- brlcad/trunk/src/libbu/color.c 2016-10-03 21:39:41 UTC (rev 68974)
+++ brlcad/trunk/src/libbu/color.c 2016-10-03 23:51:18 UTC (rev 68975)
@@ -316,7 +316,7 @@
return 0;
}
- if (!((NEAR_ZERO(result, SMALL_FASTF) && errno) || endptr == str
+ if (!((NEAR_ZERO(result, 0.0) && errno) || endptr == str
|| !strchr(allowed_separators, *endptr))) {
separator = *endptr;
break;
@@ -343,7 +343,7 @@
bu_bomb("error");
}
- if ((NEAR_ZERO(color->buc_rgb[i], SMALL_FASTF) && errno) || endptr ==
str || *endptr != expected_char
+ if ((NEAR_ZERO(color->buc_rgb[i], 0.0) && errno) || endptr == str ||
*endptr != expected_char
|| !(0.0 <= color->buc_rgb[i] && color->buc_rgb[i] <= 1.0)) {
VSETALL(color->buc_rgb, 0.0);
return 0;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits