diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-06-26 22:03:24 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-06-26 22:03:24 -0700 |
commit | e7df670f4ed2a289bdedd6e6086e33b382067016 (patch) | |
tree | 3408bf1ed57892e77f36e4c277e42dd4a11246b5 | |
parent | d4630b8686f2f481c470cf35a2c19128a24344d4 (diff) | |
download | tmwa-e7df670f4ed2a289bdedd6e6086e33b382067016.tar.gz tmwa-e7df670f4ed2a289bdedd6e6086e33b382067016.tar.bz2 tmwa-e7df670f4ed2a289bdedd6e6086e33b382067016.tar.xz tmwa-e7df670f4ed2a289bdedd6e6086e33b382067016.zip |
Don't crash for another thing that probably shouldn't happen, but does
-rw-r--r-- | src/common/dumb_ptr.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/dumb_ptr.hpp b/src/common/dumb_ptr.hpp index d9000e9..8863ef2 100644 --- a/src/common/dumb_ptr.hpp +++ b/src/common/dumb_ptr.hpp @@ -219,7 +219,8 @@ struct dumb_string dumb_string fake(const char *p) { dumb_string rv; - rv.impl = dumb_ptr<char[]>(const_cast<char *>(p), strlen(p)); + size_t len = p ? strlen(p) : 0; + rv.impl = dumb_ptr<char[]>(const_cast<char *>(p), len); return rv; } |