mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
fixed a Windows compiler warning (Chris Poblete) fix for mod when dividend
* valid.c: fixed a Windows compiler warning (Chris Poblete) * xpath.c: fix for mod when dividend is 0 (Chris Poblete) Daniel
This commit is contained in:
5
xpath.c
5
xpath.c
@ -4422,7 +4422,10 @@ xmlXPathModValues(xmlXPathParserContextPtr ctxt) {
|
||||
CAST_TO_NUMBER;
|
||||
CHECK_TYPE(XPATH_NUMBER);
|
||||
arg1 = (int) ctxt->value->floatval;
|
||||
ctxt->value->floatval = arg1 % arg2;
|
||||
if (arg2 == 0)
|
||||
ctxt->value->floatval = xmlXPathNAN;
|
||||
else
|
||||
ctxt->value->floatval = arg1 % arg2;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
|
Reference in New Issue
Block a user