From d48edd1e854e0df012b61f833d83efcd19fbe99b Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 1 Jan 2018 13:04:36 +0200 Subject: Don't call getLength() on OUStringBuffer after makeStringAndClear() It's the length of the OUString that we just made from the OUStringBuffer that we want. Fixes a problem where the code would try to execute an erronoeus SQL statement like: ')EATE TABLE "Tasks" ("Notes" VARCHAR(32765),"TaskID" INTEGER,"EndDate" DATE,"StartDate" DATE,"Description" VARCHAR(65000),' Too lazy to file a bug for this, the error should be obvious by just reading the code. Change-Id: I473cd8a7a9791700ca8b6467a84f4bad5dee4d55 Reviewed-on: https://gerrit.libreoffice.org/47230 Tested-by: Jenkins Reviewed-by: Julien Nabet --- connectivity/source/drivers/firebird/Tables.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'connectivity') diff --git a/connectivity/source/drivers/firebird/Tables.cxx b/connectivity/source/drivers/firebird/Tables.cxx index 06d3033443c0..b41ea4e2d21b 100644 --- a/connectivity/source/drivers/firebird/Tables.cxx +++ b/connectivity/source/drivers/firebird/Tables.cxx @@ -191,7 +191,7 @@ ObjectType Tables::appendObject(const OUString& rName, else { if ( sSql.endsWith(",") ) - sSql = sSql.replaceAt(aSqlBuffer.getLength()-1, 1, ")"); + sSql = sSql.replaceAt(sSql.getLength()-1, 1, ")"); else sSql += ")"; } -- cgit