diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-05-26 14:00:32 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-05-28 21:00:38 +0200 |
commit | 7066a4f8ca8a5a0e34766728f8a48ce2ef4823af (patch) | |
tree | ba52e15c256b7d2a932501b85e1d8ae6b0abba5a | |
parent | db4a7dd4021723a7415099a9942f3d0b67ca75de (diff) |
Related tdf#153317: extra check since we deal with signed integers
Thank you Michael Stahl for having spotted this! :-)
Change-Id: I4e643b562e6dc653a511109531837c228f0e0e0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152305
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
(cherry picked from commit 42547b6472cad484bced8aa47ecadd6d21d587ac)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152312
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r-- | dbaccess/source/ui/dlg/directsql.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index a82f8d4c10f8..856a20319b03 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -325,7 +325,7 @@ namespace dbaui // In this case, there's a good chance it's a "Bit" field // remark: for unknown reason, getByte(i) gives "\000" even if the bit is at 1. auto seq = xRow->getBytes(i); - if ((seq.getLength() == 1) && (seq[0] <= 1)) + if ((seq.getLength() == 1) && (seq[0] >= 0) && (seq[0] <= 1)) { out.append(OUString::number(static_cast<int>(seq[0])) + ","); } |