mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
fixed the xmlLineNumbersDefault() errors, lesson don't add new functions
* parser.c parserInternals.c: fixed the xmlLineNumbersDefault() errors, lesson don't add new functions at 1am before a release * xpath.c: integrated fix from Bjorn to avoid divide by zero from XPath initialization when possible. Daniel
This commit is contained in:
7
xpath.c
7
xpath.c
@ -194,9 +194,16 @@ xmlXPathInit(void) {
|
||||
|
||||
if (initialized) return;
|
||||
|
||||
#if defined(HUGE_VAL) && defined(DBL_MAX)
|
||||
xmlXPathPINF = (HUGE_VAL == DBL_MAX) ?
|
||||
xmlXPathDivideBy(1.0, 0.0) : HUGE_VAL;
|
||||
xmlXPathNINF = -xmlXPathPINF;
|
||||
xmlXPathNAN = xmlXPathDivideBy(xmlXPathPINF, xmlXPathPINF);
|
||||
#else
|
||||
xmlXPathNAN = xmlXPathDivideBy(0.0, 0.0);
|
||||
xmlXPathPINF = xmlXPathDivideBy(1.0, 0.0);
|
||||
xmlXPathNINF = xmlXPathDivideBy(-1.0, 0.0);
|
||||
#endif
|
||||
|
||||
initialized = 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user