startpos is zero based

svn path=/trunk/; revision=31904
This commit is contained in:
Christoph von Wittich 2008-01-20 14:41:22 +00:00
parent 67ed022d72
commit 78f6ee1af6

View file

@ -1172,7 +1172,7 @@ GetEnvVarOrSpecial ( LPCTSTR varName )
i++;
Token = _tcstok (NULL, _T(","));
}
_tcsncpy(ReturnValue, ret + (1 - StringPart[0]), StringPart[1]);
_tcsncpy(ReturnValue, ret + StringPart[0], StringPart[1]);
_tcscpy(ret, ReturnValue);
return ret;
}