diff options
-rw-r--r-- | odb/oracle/error.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/odb/oracle/error.cxx b/odb/oracle/error.cxx index 68bdc44..006fef5 100644 --- a/odb/oracle/error.cxx +++ b/odb/oracle/error.cxx @@ -4,6 +4,7 @@ #include <oci.h> +#include <cstring> // std::strlen #include <cassert> #include <odb/details/buffer.hxx> @@ -184,6 +185,12 @@ namespace odb if (r == OCI_NO_DATA) break; + // Get rid of a trailing newline if there is one. + // + size_t n (strlen (b)); + if (n != 0 && b[n - 1] == '\n') + b[n - 1] = '\0'; + dbe.append (e, b); } |