aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-10-05 10:58:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-10-05 10:58:38 +0200
commitedf29e0bb4a2bf078c3b02c54ab808a1a11b7753 (patch)
treeb70fa20b105008b0a78ad42700b3274398501022
parent15af783d2b1473ac46b0c8cfcb2d4a794706e4e0 (diff)
Fix bug in short national char data querying
-rw-r--r--odb/mssql/query.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/odb/mssql/query.hxx b/odb/mssql/query.hxx
index 30b56be..636b7b6 100644
--- a/odb/mssql/query.hxx
+++ b/odb/mssql/query.hxx
@@ -1699,11 +1699,11 @@ namespace odb
std::size_t size (0);
value_traits<T, id_nstring>::set_image (
reinterpret_cast<ucs2_char*> (buf_.data ()),
- buf_.capacity (),
+ buf_.capacity () / 2,
size,
is_null,
v);
- size_ind_ = static_cast<SQLLEN> (size);
+ size_ind_ = static_cast<SQLLEN> (size * 2);
}
private: