From 67b62e323ea6b084275fd6318f23443bb2f698ee Mon Sep 17 00:00:00 2001 From: angelo Date: Tue, 10 Jun 1997 13:27:07 +0000 Subject: [PATCH] Corretta TFilename::tempdir(). Non funzionava per nomi utente lunghi 7 chars. git-svn-id: svn://10.65.10.50/trunk@4575 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/strings.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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))