Fix warning (Issue #301)

This commit is contained in:
Michael R Sweet 2024-03-06 16:48:06 -05:00
parent 83e9b0a6bc
commit 069a353eaf
No known key found for this signature in database
GPG Key ID: BE67C75EC81F3244
2 changed files with 3 additions and 1 deletions

View File

@ -8,11 +8,13 @@
- Added new `MXML_TYPE_CDATA`, `MXML_TYPE_COMMENT`, `MXML_TYPE_DECLARATION`, and
`MXML_TYPE_DIRECTIVE` node types (Issue #250)
- Added `mxmlLoadFilename` and `mxmlSaveFilename` functions (Issue #291)
- Added AFL fuzzing support (Issue #306)
- Renamed `mxml_type_t` enumerations to `MXML_TYPE_xxx` (Issue #251)
- Updated APIs to use bool type instead of an int representing a boolean value.
- Updated the SAX callback to return a `bool` value to control processing
(Issue #51)
- Updated the load and save callbacks to include a context pointer (Issue #106)
- Fixed some warnings (Issue #301)
# Changes in Mini-XML 3.3.2

View File

@ -117,7 +117,7 @@ mxmlFindPath(mxml_node_t *top, // I - Top node
if ((pathsep = strchr(path, '/')) == NULL)
pathsep = path + strlen(path);
if (pathsep == path || (pathsep - path) >= sizeof(element))
if (pathsep == path || (size_t)(pathsep - path) >= sizeof(element))
return (NULL);
memcpy(element, path, pathsep - path);