add nul terminator to loaded string.

This commit is contained in:
Enno Rehling 2017-11-10 07:45:41 +01:00
parent add9d24f52
commit df4cc70abf
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ order_data *db_load_order(int id)
bytes = sqlite3_column_bytes(g_stmt_select, 0);
assert(bytes > 0);
text = sqlite3_column_text(g_stmt_select, 0);
odata_create(&od, (size_t)bytes, (const char *)text);
odata_create(&od, 1+(size_t)bytes, (const char *)text);
return od;
}
} while (err == SQLITE_ROW);