mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
Optimize and shorten StringCxxLength
svn path=/branches/ros-amd64-bringup/; revision=35691
This commit is contained in:
@@ -286,11 +286,7 @@ STRSAFEAPI StringCxxLength(STRSAFE_LPCTSTR psz, size_t cxMax, size_t *pcx)
|
||||
return STRSAFE_E_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
while (*psz != 0 && cch != 0)
|
||||
{
|
||||
cch--;
|
||||
psz++;
|
||||
}
|
||||
for (--psz; *(++psz) != 0 && --cch > 0;);
|
||||
|
||||
if (cch == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user