diff options
Diffstat (limited to 'odb/qt/basic/oracle/qbyte-array-traits.hxx')
-rw-r--r-- | odb/qt/basic/oracle/qbyte-array-traits.hxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/odb/qt/basic/oracle/qbyte-array-traits.hxx b/odb/qt/basic/oracle/qbyte-array-traits.hxx index 58807b9..3d99cd7 100644 --- a/odb/qt/basic/oracle/qbyte-array-traits.hxx +++ b/odb/qt/basic/oracle/qbyte-array-traits.hxx @@ -59,11 +59,10 @@ namespace odb n = static_cast<std::size_t> (v.size ()); - //@@ Assert or throw? - // - assert (n <= c); + if (n > c) + n = c; - std::memcpy (b, v.data (), n); + std::memcpy (b, v.constData (), n); } } }; |