Resolves: fdo#73771 Non-standard behaviour for Function Mid

Change-Id: I90be516235228574dc219447a0eef3a34f83bee2
Reviewed-on: https://gerrit.libreoffice.org/7539
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Julien Nabet
2014-01-19 21:56:40 +01:00
committed by Caolán McNamara
parent 840e7f0043
commit ff48f28f71

View File

@@ -1302,7 +1302,8 @@ RTLFUNC(Mid)
{ {
nLen = aArgStr.getLength() - nStartPos; nLen = aArgStr.getLength() - nStartPos;
} }
aResultStr = aArgStr.copy( nStartPos, nLen ); if (nLen > 0)
aResultStr = aArgStr.copy( nStartPos, nLen );
} }
rPar.Get(0)->PutString( aResultStr ); rPar.Get(0)->PutString( aResultStr );
} }