forked from github/server
github issue #458, valgrind reports uninitialized data
This commit is contained in:
parent
b6b452c77b
commit
6286100350
|
@ -123,7 +123,7 @@ static void update_faction(sqlite3 *db, const faction *f) {
|
||||||
"INSERT INTO faction_data (faction_id, code, name, email, lang, turn)"
|
"INSERT INTO faction_data (faction_id, code, name, email, lang, turn)"
|
||||||
" VALUES (?, ?, ?, ?, ?, ?)";
|
" VALUES (?, ?, ?, ?, ?, ?)";
|
||||||
sqlite3_stmt *stmt = 0;
|
sqlite3_stmt *stmt = 0;
|
||||||
strncpy(code, itoa36(f->no), sizeof(code)-1);
|
strncpy(code, itoa36(f->no), sizeof(code));
|
||||||
sqlite3_prepare_v2(db, sql, -1, &stmt, 0);
|
sqlite3_prepare_v2(db, sql, -1, &stmt, 0);
|
||||||
sqlite3_bind_int(stmt, 1, f->subscription);
|
sqlite3_bind_int(stmt, 1, f->subscription);
|
||||||
sqlite3_bind_text(stmt, 2, code, -1, SQLITE_STATIC);
|
sqlite3_bind_text(stmt, 2, code, -1, SQLITE_STATIC);
|
||||||
|
|
Loading…
Reference in New Issue