Commit 2e1927cd authored by Davis King's avatar Davis King

Fixed a bug in the statement::get_column_as_text() routine. It didn't

work right if the column contained a NULL.
parent ecfddbad
...@@ -268,7 +268,10 @@ namespace dlib ...@@ -268,7 +268,10 @@ namespace dlib
); );
const char* data = reinterpret_cast<const char*>(sqlite3_column_text(stmt, idx)); const char* data = reinterpret_cast<const char*>(sqlite3_column_text(stmt, idx));
return std::string(data); if (data != 0)
return std::string(data);
else
return std::string();
} }
double get_column_as_double ( double get_column_as_double (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment