index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-08-28 23:05:20 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-28 23:50:28 -0500 |
commit | 8973875a1fc52ec35c255afd34c9cd7d5c285caa (patch) | |
tree | 12e0fdcfa46d1ec8337a00e43c981ede41bcb41b | |
parent | b221af660d101301606e263cef73b358937516a6 (diff) |
-rw-r--r-- | lib/libalpm/deps.c | 6 |
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index 47b7637a..e268157a 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -441,7 +441,11 @@ alpm_depend_t *_alpm_splitdep(const char *depstring) } /* copy the right parts to the right places */ - STRNDUP(depend->name, depstring, ptr - depstring, return NULL); + if(ptr) { + STRNDUP(depend->name, depstring, ptr - depstring, return NULL); + } else { + STRDUP(depend->name, depstring, return NULL); + } depend->name_hash = _alpm_hash_sdbm(depend->name); if(version) { STRDUP(depend->version, version, return NULL); |