pkg: tolerate NULL in pkgconf_compare_version() (closes #85)

feature/tap-sh
William Pitcock 2016-01-21 11:08:36 -05:00
parent ceb7232190
commit a892af7464
1 changed files with 6 additions and 0 deletions

View File

@ -528,6 +528,12 @@ pkgconf_compare_version(const char *a, const char *b)
bool isnum;
/* optimization: if version matches then it's the same version. */
if (a == NULL)
return 1;
if (b == NULL)
return -1;
if (!strcasecmp(a, b))
return 0;