forked from github/server
add nul terminator to loaded string.
This commit is contained in:
parent
add9d24f52
commit
df4cc70abf
|
@ -35,7 +35,7 @@ order_data *db_load_order(int id)
|
||||||
bytes = sqlite3_column_bytes(g_stmt_select, 0);
|
bytes = sqlite3_column_bytes(g_stmt_select, 0);
|
||||||
assert(bytes > 0);
|
assert(bytes > 0);
|
||||||
text = sqlite3_column_text(g_stmt_select, 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;
|
return od;
|
||||||
}
|
}
|
||||||
} while (err == SQLITE_ROW);
|
} while (err == SQLITE_ROW);
|
||||||
|
|
Loading…
Reference in New Issue