mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
Merge pull request #26062 from cleverca22/libredirect
libredirect: allow null paths
This commit is contained in:
commit
dc4e2cd70f
@ -47,6 +47,7 @@ static void init()
|
|||||||
|
|
||||||
static const char * rewrite(const char * path, char * buf)
|
static const char * rewrite(const char * path, char * buf)
|
||||||
{
|
{
|
||||||
|
if (path == NULL) return path;
|
||||||
for (int n = 0; n < nrRedirects; ++n) {
|
for (int n = 0; n < nrRedirects; ++n) {
|
||||||
int len = strlen(from[n]);
|
int len = strlen(from[n]);
|
||||||
if (strncmp(path, from[n], len) != 0) continue;
|
if (strncmp(path, from[n], len) != 0) continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user