Commit 89d2d648 authored by Max Kellermann's avatar Max Kellermann

ConfigPath: return early on "~"

Previously, the pointer was moved to undefined memory.
parent 7532f24d
......@@ -84,11 +84,14 @@ ParsePath(const char *path, Error &error)
#ifndef WIN32
if (path[0] == '~') {
Path home = Path::Null();
++path;
if (*path == '/' || *path == '\0') {
if (*path == '\0')
return GetConfiguredHome(error);
Path home = Path::Null();
if (*path == '/') {
home = GetConfiguredHome(error);
++path;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment