myadm

Simple MySQL client for the terminal
git clone git://git.bitsmanent.org/myadm
Log | Files | Refs | README | LICENSE

commit d308784a6ac925cbfbdd43c88edc7334344e333a
parent b9f9a54094231fb3b90bc548fd5e40de11bec1a6
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Mon, 25 Apr 2016 15:36:37 +0200

Add space for the null byte.

Diffstat:
Mmyadm.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/myadm.c b/myadm.c @@ -474,7 +474,7 @@ mksql_update_record(Item *item, Field *fields, char *tbl, char *pk) { if(nq) free(col); } - size = 28 + cnt + strlen(pk) + strlen(pkv) + strlen(tbl); + size = 1 + 28 + cnt + strlen(pk) + strlen(pkv) + strlen(tbl); sql = ecalloc(1, size); snprintf(sql, size, "UPDATE `%s` SET%s\nWHERE `%s` = '%s'", tbl, sqlfds, pk, pkv); free(sqlfds);