From 36e0e88b28e818faf25b8e32cc8c4dc444b8a0be Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 7 Apr 2022 20:54:55 +0200 Subject: use more subView when converting to Int32 Change-Id: I54e3ddf79ba793fd4328bf8bda7f949b65349651 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132693 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/runtime/dllmgr-x64.cxx | 2 +- basic/source/runtime/dllmgr-x86.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'basic/source') diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx index b2ddbb890da1..15226cc3fb3c 100644 --- a/basic/source/runtime/dllmgr-x64.cxx +++ b/basic/source/runtime/dllmgr-x64.cxx @@ -608,7 +608,7 @@ ErrCode getProcData(HMODULE handle, OUString const & name, ProcData * proc) { assert(proc != nullptr); if (name.getLength() != 0 && name[0] == '@') { //TODO: "@" vs. "#"??? - sal_Int32 n = name.copy(1).toInt32(); //TODO: handle bad input + sal_Int32 n = comphelper::string::toInt32(name.subView(1)); //TODO: handle bad input if (n <= 0 || n > 0xFFFF) { return ERRCODE_BASIC_BAD_ARGUMENT; //TODO: more specific errcode? } diff --git a/basic/source/runtime/dllmgr-x86.cxx b/basic/source/runtime/dllmgr-x86.cxx index 93e5c2bf533f..3433282c22ec 100644 --- a/basic/source/runtime/dllmgr-x86.cxx +++ b/basic/source/runtime/dllmgr-x86.cxx @@ -584,7 +584,7 @@ ErrCode getProcData(HMODULE handle, OUString const & name, ProcData * proc) { assert(proc != 0); if ( !name.isEmpty() && name[0] == '@' ) { //TODO: "@" vs. "#"??? - sal_Int32 n = name.copy(1).toInt32(); //TODO: handle bad input + sal_Int32 n = comphelper::string::toInt32(name.subView(1)); //TODO: handle bad input if (n <= 0 || n > 0xFFFF) { return ERRCODE_BASIC_BAD_ARGUMENT; //TODO: more specific errcode? } -- cgit