Fix: Chat history sqlite truncating long messages

This commit is contained in:
Michal Micka 2013-08-08 13:38:57 +02:00 committed by Francisco Blas (klondike) Izquierdo Riera
parent 0e27e4219d
commit 5e63ab2ccd
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ static int null_callback(void* ptr, int argc, char **argv, char **colName) { ret
static const char* sql_escape_string(const char* str)
{
static char out[1024];
static char out[MAX_HISTORY_SIZE];
size_t i = 0;
size_t n = 0;
for (; n < strlen(str); n++)
@ -65,7 +65,7 @@ static const char* sql_escape_string(const char* str)
static int sql_execute(struct chat_history_data* sql, int (*callback)(void* ptr, int argc, char **argv, char **colName), void* ptr, const char* sql_fmt, ...)
{
va_list args;
char query[1024];
char query[MAX_HISTORY_SIZE];
char* errMsg;
int rc;