[Liblas-commits] hg: try to fix off-by-one error introduced in
78a99d13d177
liblas-commits at liblas.org
liblas-commits at liblas.org
Sun Apr 10 15:43:05 EDT 2011
details: http://hg.liblas.orghg/rev/c3e0e7a56106
changeset: 2922:c3e0e7a56106
user: Howard Butler <hobu.inc at gmail.com>
date: Sun Apr 10 14:42:59 2011 -0500
description:
try to fix off-by-one error introduced in 78a99d13d177
diffstat:
apps/las2oci.cpp | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (35 lines):
diff -r 78a99d13d177 -r c3e0e7a56106 apps/las2oci.cpp
--- a/apps/las2oci.cpp Tue Apr 05 16:26:54 2011 -0500
+++ b/apps/las2oci.cpp Sun Apr 10 14:42:59 2011 -0500
@@ -415,10 +415,10 @@
values << "pc";
}
- int nPos = 1; // Bind column position
+ int nPos = 2; // Bind column position
if (!header_blob_column_u.empty()){
columns << "," << header_blob_column_u;
- values <<", :" << nPos++;
+ values <<", :" << nPos;
}
if (!boundary_column_u.empty()){
@@ -534,14 +534,15 @@
}
- std::string wkt(boundary_wkt); // copy the string to satisfy the compiler's const complaints
-
+
+ char* wkt = (char*) malloc(boundary_wkt.size() * sizeof(char));
+ strncpy(wkt, boundary_wkt.c_str(), boundary_wkt.size());
if (!boundary_column_u.empty()){
OCILobLocator** locator =(OCILobLocator**) VSIMalloc( sizeof(OCILobLocator*) * 1 );
statement->DefineClob( locator, 1 );
- statement->BindClob((char*)wkt.c_str(),(long)wkt.size());
+ statement->BindClob(wkt,(long)boundary_wkt.size());
// statement->Bind((char*)&(wkt[0]),(long)wkt.size());
More information about the Liblas-commits
mailing list