diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-01-01 13:04:36 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-01-01 13:58:18 +0100 |
commit | d48edd1e854e0df012b61f833d83efcd19fbe99b (patch) | |
tree | 237d099a5bda75e39c8d345e619aa04efa642e32 /connectivity | |
parent | 9fc9bf3240f8c62ad7859947ab8a033ac1fe93fa (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/firebird/Tables.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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 += ")"; } |