From 344018eb919c48c333bdf6aa1479b82c9a457a5c Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Fri, 20 Feb 2009 14:42:34 +0100 Subject: Fixed table indices in sqlite plugin. --- lib/Plugins/SQLite3.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/Plugins/SQLite3.cpp') diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp index f96f3fa..6553fda 100644 --- a/lib/Plugins/SQLite3.cpp +++ b/lib/Plugins/SQLite3.cpp @@ -23,6 +23,7 @@ #include #include "SQLite3.h" #include +#include #define TABLE_NAME "CrashCatcher" @@ -75,23 +76,24 @@ void CSQLite3::GetTable(const std::string& pCommand, vector_database_rows_t& pTa { switch(jj) { - case 0: row.m_sUUID = table[jj + ncol]; + case 0: row.m_sUUID = table[jj +(ncol*ii) + ncol]; break; - case 1: row.m_sUID = table[jj + ncol]; + case 1: row.m_sUID = table[jj +(ncol*ii) + ncol]; break; - case 2: row.m_sDebugDumpDir = table[jj + ncol]; + case 2: row.m_sDebugDumpDir = table[jj +(ncol*ii) + ncol]; break; - case 3: row.m_sCount = table[jj + ncol]; + case 3: row.m_sCount = table[jj +(ncol*ii) + ncol]; break; - case 4: row.m_sReported = table[jj + ncol]; + case 4: row.m_sReported = table[jj +(ncol*ii) + ncol]; break; - case 5: row.m_sTime = table[jj + ncol]; + case 5: row.m_sTime = table[jj +(ncol*ii) + ncol]; break; default: break; } } pTable.push_back(row); + } sqlite3_free_table(table); } -- cgit