diff options
author | Brian Orr <brianorr@google.com> | 2021-06-15 12:47:53 -0700 |
---|---|---|
committer | Daniel Norman <danielnorman@google.com> | 2021-06-17 13:37:54 -0700 |
commit | 71c831703ae59baf47e0afe611fecd714c481cdf (patch) | |
tree | 06731a987032723085b9e1a65951cf96abbc19cf /services/incremental/path.cpp | |
parent | 065c9e9a6e9d61d4383a91721eb56a3de253bdbe (diff) | |
parent | 81833820d54b9a6b27894f9f8dfd72222d416992 (diff) |
Merge SP1A.210604.001
Change-Id: I5200ee05285ae422d5e9c1c00f45709a5d6188be
Diffstat (limited to 'services/incremental/path.cpp')
-rw-r--r-- | services/incremental/path.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/incremental/path.cpp b/services/incremental/path.cpp index bf4e9616057c..73e00aed061a 100644 --- a/services/incremental/path.cpp +++ b/services/incremental/path.cpp @@ -171,7 +171,9 @@ std::string_view dirname(std::string_view path) { } details::CStrWrapper::CStrWrapper(std::string_view sv) { - if (sv[sv.size()] == '\0') { + if (!sv.data()) { + mCstr = ""; + } else if (sv[sv.size()] == '\0') { mCstr = sv.data(); } else { mCopy.emplace(sv); |