Minor WIN32/POSIX bug in resolve_origin()

This commit is contained in:
Nicolas Williams
2013-12-13 13:26:51 -06:00
parent f604e424d1
commit c9985fc695

View File

@@ -244,9 +244,9 @@ resolve_origin(const char *di)
#ifdef _WIN32
p = strrchr(dname, '\\');
if (p == NULL)
#endif
#else
p = strrchr(dname, '/');
#endif
if (p) {
if (asprintf(&path, "%.*s%s", (int) (p - dname), dname, di) == -1)
return NULL;