[Fix] 'Infinity' parsing.

Fixes issue #455. Credits to @id-ilych for investigating the issue.
This commit is contained in:
Enrico Giordani
2016-05-02 11:08:39 +02:00
parent cc6ce270dc
commit aa9367d8ca
+1 -1
View File
@@ -41,7 +41,7 @@ double wstrtod(const char *nptr, char **eptr) {
if (_strnicmp("INF", nptr, 3) == 0) {
if (eptr != NULL) {
if (_strnicmp("INFINITE", nptr, 8) == 0) {
if ((_strnicmp("INFINITE", nptr, 8) == 0) || (_strnicmp("INFINITY", nptr, 8) == 0)) {
*eptr = (char*) (nptr + 8);
} else {
*eptr = (char*) (nptr + 3);