diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:03:20 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:03:20 +0200 |
commit | 528635604eea1d8c679a3d038e2f00030ef72444 (patch) | |
tree | 9c3cbec29aa7d3e209939662e040b9342c9e7400 /shared/zstring.h | |
parent | 3.1 (diff) | |
download | FreeFileSync-528635604eea1d8c679a3d038e2f00030ef72444.tar.gz FreeFileSync-528635604eea1d8c679a3d038e2f00030ef72444.tar.bz2 FreeFileSync-528635604eea1d8c679a3d038e2f00030ef72444.zip |
3.2
Diffstat (limited to 'shared/zstring.h')
-rw-r--r-- | shared/zstring.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shared/zstring.h b/shared/zstring.h index 68b72060..d0be30bf 100644 --- a/shared/zstring.h +++ b/shared/zstring.h @@ -61,7 +61,7 @@ public: Zstring BeforeLast( DefaultChar ch) const; //returns empty string if ch not found Zstring AfterFirst( DefaultChar ch) const; //returns empty string if ch not found Zstring BeforeFirst(DefaultChar ch) const; //returns the whole string if ch not found - size_t Find(DefaultChar ch, bool fromEnd) const; + size_t Find(DefaultChar ch, bool fromEnd) const; //returns npos if not found bool Matches(const DefaultChar* mask) const; static bool Matches(const DefaultChar* name, const DefaultChar* mask); Zstring& Trim(bool fromRight); //from right or left @@ -333,6 +333,7 @@ Zstring::~Zstring() inline void Zstring::initAndCopy(const DefaultChar* source, size_t sourceLen) { + assert(source); descr = allocate(sourceLen); ::memcpy(data(), source, sourceLen * sizeof(DefaultChar)); data()[sourceLen] = 0; |