[Libreoffice-commits] core.git: sot/source
Kohei Yoshida
kohei.yoshida at collabora.com
Wed Feb 12 20:41:54 CET 2014
sot/source/sdstor/stgelem.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit da2efb3e14aa93be13dc4a88f0e41b7dc7948e15
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Wed Feb 12 11:13:32 2014 -0500
Perhaps it's better to use nMaxLegalStr here than using hardcoded 32.
Change-Id: Idee4667f5ef9aa71af05139b6fc7ee8a5166b398
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index e2aae4b..cd3eee6 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -298,12 +298,12 @@ bool StgEntry::SetName( const OUString& rName )
aName = aName.copy(0, nMaxLegalStr);
}
- int i;
- for( i = 0; i < rName.getLength() && i < 32; i++ )
+ sal_uInt16 i;
+ for( i = 0; i < rName.getLength() && i <= nMaxLegalStr; i++ )
{
nName[ i ] = rName[ i ];
}
- while( i < 32 )
+ while (i <= nMaxLegalStr)
{
nName[ i++ ] = 0;
}
More information about the Libreoffice-commits
mailing list