Skip to content

Commit

Permalink
Fix warning (Issue #301)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Mar 6, 2024
1 parent 83e9b0a commit 069a353
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mxml-search.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 069a353

Please sign in to comment.