pkgconf_pkg_parser_version_func: fix whitespace detection #204

Merged
lazka merged 1 commits from fix-version-whitespace-detect into master 2020-11-29 02:17:04 +00:00
lazka commented 2020-11-28 17:26:24 +00:00 (Migrated from github.com)

In case the version string has no whitespace then strcspn() returns
strlen() of the input, so whitespace is only found if len != strlen.

This fixes invalid warnings when parsing version fields.

In case the version string has no whitespace then strcspn() returns strlen() of the input, so whitespace is only found if len != strlen. This fixes invalid warnings when parsing version fields.
lazka commented 2020-11-28 17:32:19 +00:00 (Migrated from github.com)

This fixes all the warnings like:

> pkgconf.exe glib-2.0 --validate
/usr/lib/pkgconfig/glib-2.0.pc:12: warning: malformed version field with whitespace, trimming to [2.64.6]
This fixes all the warnings like: ``` > pkgconf.exe glib-2.0 --validate /usr/lib/pkgconfig/glib-2.0.pc:12: warning: malformed version field with whitespace, trimming to [2.64.6] ```
lazka commented 2020-11-29 14:09:19 +00:00 (Migrated from github.com)

Thanks!

Thanks!
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ariadne/pkgconf#204
There is no content yet.