diff --git a/include/strings.cpp b/include/strings.cpp index 08bbabc8a..e9e43b822 100755 --- a/include/strings.cpp +++ b/include/strings.cpp @@ -127,11 +127,11 @@ TString::TString(const TString& s) : _str(NULL), _size(0) TString::TString(int size, char c) : _str(NULL), _size(0) { - resize(size, FALSE); - *(_str+size--)='\0'; - for (;c && size>=0; size--) - *(_str+size)=c; - + resize(size, FALSE); + *(_str+size--)='\0'; + for (;c && size>=0; size--) + *(_str+size)=c; + } TString::TString() : _str(NULL), _size(0) @@ -1070,7 +1070,8 @@ const TFilename& TFilename::tempdir() if (theuser.empty()) theuser = "prassi"; theuser.lower(); - if (theuser.not_empty() && _tempdir.find(theuser) != _tempdir.len() - theuser.len()) + const int f = _tempdir.find(theuser); + if (f < 0 || f != _tempdir.len() - theuser.len()) _tempdir << SLASH << theuser; _tempdir.lower(); if (!fexist(_tempdir))