X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=lib%2Fnotes.c;h=b29cbc79f5438ad83a78c8c3952853a7aa0c73a9;hb=09c80a1f8918d888063f4d1a75921a99fe5f0b5c;hp=9622baebc399aa4dee62803db1d7db57a29f86bb;hpb=383712eefa950c5dc619f8cd5fb60be8e8041502;p=zpackage diff --git a/lib/notes.c b/lib/notes.c index 9622bae..b29cbc7 100644 --- a/lib/notes.c +++ b/lib/notes.c @@ -69,7 +69,7 @@ int64_t zpm_note(struct zpm *zpm, struct zpm_note *n, unsigned int flags) { n->path = colstring(st, 4); n->file = colstring(st, 5); n->ack = sqlite3_column_int(st, 6); - n->ts = sqlite3_column_int(st, 1); + n->ts = colstring(st, 1); n->id = sqlite3_column_int64(st, 0); id = n->id; break; @@ -87,6 +87,8 @@ void zpm_note_free(struct zpm_note *n) { free(n->pkgid); free(n->path); free(n->file); + free(n->ts); + n->note = n->ts = n->pkgid = n->path = n->file = 0; } int zpm_notes_available(struct zpm *zpm, int flags) {