Skip to content

Commit

Permalink
Merged revision(s) 454 from trunk:
Browse files Browse the repository at this point in the history
Fixed bug in FormatSizeString (if a large enough size was passed in, it would likely cause a crash).
........
  • Loading branch information
derceg committed Nov 8, 2011
1 parent 10b695b commit 582957a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Explorer++/Helper/Helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ size_t cchBuf,BOOL bForceSize,SizeDisplayFormat_t sdf)
iSizeIndex++;
}

if(iSizeIndex > SIZEOF_ARRAY(pszSizeTypes))
if(iSizeIndex > (SIZEOF_ARRAY(pszSizeTypes) - 1))
{
StringCchCopy(pszFileSize,cchBuf,EMPTY_STRING);
return;
Expand Down

0 comments on commit 582957a

Please sign in to comment.