libpkgconf: pkg: use a second pointer for demunging windows paths

master
Ariadne Conill 2020-05-26 13:41:39 -06:00
parent 92b09aef9a
commit c613eb5cce
2 changed files with 9 additions and 2 deletions

6
NEWS
View File

@ -1,6 +1,12 @@
Changes from previous version of pkgconf
========================================
Changes from 1.7.1 to 1.7.2:
----------------------------
* Bug fixes:
- Fix a windows-specific crash relating to path fixups.
Changes from 1.7.0 to 1.7.1:
----------------------------

View File

@ -389,8 +389,9 @@ pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *filename, FILE *
* strrchr() took us to the last \ in that case, so we just have to see if
* it is followed by a /. If so, lop it off.
*/
if ((idptr = strrchr(idptr, '/')) != NULL)
idptr++;
char *mungeptr;
if ((mungeptr = strrchr(idptr, '/')) != NULL)
idptr = mungeptr++;
#endif
pkg->id = strdup(idptr);