Minor WIN32/POSIX bug in resolve_origin()
This commit is contained in:
@@ -244,9 +244,9 @@ resolve_origin(const char *di)
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
p = strrchr(dname, '\\');
|
p = strrchr(dname, '\\');
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
p = strrchr(dname, '/');
|
p = strrchr(dname, '/');
|
||||||
|
#endif
|
||||||
if (p) {
|
if (p) {
|
||||||
if (asprintf(&path, "%.*s%s", (int) (p - dname), dname, di) == -1)
|
if (asprintf(&path, "%.*s%s", (int) (p - dname), dname, di) == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user