• Stephan Bergmann's avatar
    tdf#111313: Honor bWriteNoLenParam in !bCompatibility, too · cc203440
    Stephan Bergmann yazdı
    e8deba22 "INTEGRATION: CWS ab26" had added
    the bCompatibility case with all the argument checking ("2006/05/04 08:33:46 ab #111951# Changed Mid runtime behaviour only for
    CompatibilityMode(true)"), and it was probably an oversight that, for
    !bCompatibility, it left the bWriteNoLenParam case (triggered by Basic code like
      s = "abc"
      Mid(s,1) = "d"
    ) calling OUStringBuffer::remove with an illegal argument of len=-1.
    Change that so that only setting ERRCODE_BASIC_BAD_ARGUMENT is controlled by
    bCompatibility, while all the other checks (that are probably all necessary to
    not call rtl string functions with illegal arguments) are done in both modes.
    Also, the check
      nStartPos + 1 > nArgLen
    should probably be
      nStartPos > nArgLen
    instead, as nStartPos has already been decremented from the one-based Basic
    index to the zero-baesd rtl string index.
    Change-Id: I75deec0acf75b8677aa89f91897c06c1caa5614d
    Reviewed-on: https://gerrit.libreoffice.org/52500Tested-by: 's avatarJenkins <ci@libreoffice.org>
    Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Son kayıt (commit)
Son güncelleme
inc Loading commit data...
qa Loading commit data...
source Loading commit data...
util Loading commit data...
AllLangMoTarget_sb.mk Loading commit data...
CppunitTest_basic_macros.mk Loading commit data...
CppunitTest_basic_scanner.mk Loading commit data...
Library_sb.mk Loading commit data...
Makefile Loading commit data...
Module_basic.mk Loading commit data...
README Loading commit data...