diff options
author | Don Kjer <don@lindenlab.com> | 2007-07-20 20:38:05 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2007-07-20 20:38:05 +0000 |
commit | d373dcc7cbed5fdea72c6b71a5594e4e85549b43 (patch) | |
tree | 140e20f48db5dc4d7842f05ef2c24ef9e6fc3238 /indra/llmath | |
parent | c78f99b0b3b4b9ac99a69b63315e821d89a89a3b (diff) |
svn merge -r 64548:64837 svn+ssh://svn/svn/linden/branches/maintenance into release
* WARNING *: maintenance r64837 is not the last rev to use in the next merge. use r65269
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/llmath.h | 3 | ||||
-rw-r--r-- | indra/llmath/llvolume.cpp | 18 |
2 files changed, 18 insertions, 3 deletions
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index 5fd365086f..5fa74f30f2 100644 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -22,6 +22,9 @@ #elif (LL_LINUX && __GNUC__ <= 2) #define llisnan(val) isnan(val) #define llfinite(val) isfinite(val) +#elif LL_SOLARIS +#define llisnan(val) isnan(val) +#define llfinite(val) (val <= std::numeric_limits<double>::max()) #else #define llisnan(val) std::isnan(val) #define llfinite(val) std::isfinite(val) diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 67ffb6d628..7345dabf72 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -730,7 +730,11 @@ BOOL LLProfileParams::importFile(FILE *fp) while (!feof(fp)) { - fgets(buffer, BUFSIZE, fp); + if (fgets(buffer, BUFSIZE, fp) == NULL) + { + buffer[0] = '\0'; + } + sscanf( /* Flawfinder: ignore */ buffer, " %255s %255s", @@ -1231,7 +1235,11 @@ BOOL LLPathParams::importFile(FILE *fp) while (!feof(fp)) { - fgets(buffer, BUFSIZE, fp); + if (fgets(buffer, BUFSIZE, fp) == NULL) + { + buffer[0] = '\0'; + } + sscanf( /* Flawfinder: ignore */ buffer, " %255s %255s", @@ -3562,7 +3570,11 @@ BOOL LLVolumeParams::importFile(FILE *fp) while (!feof(fp)) { - fgets(buffer, BUFSIZE, fp); + if (fgets(buffer, BUFSIZE, fp) == NULL) + { + buffer[0] = '\0'; + } + sscanf(buffer, " %255s", keyword); /* Flawfinder: ignore */ if (!strcmp("{", keyword)) { |