]> pd.if.org Git - zpackage/blobdiff - lib/notes.c
rework zpm-note
[zpackage] / lib / notes.c
index b337fd446756a320330519e6f6bfaa7a3a48eea1..b29cbc79f5438ad83a78c8c3952853a7aa0c73a9 100644 (file)
@@ -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,7 +87,8 @@ void zpm_note_free(struct zpm_note *n) {
        free(n->pkgid);
        free(n->path);
        free(n->file);
-       n->note = n->pkgid = n->path = n->file = 0;
+       free(n->ts);
+       n->note = n->ts = n->pkgid = n->path = n->file = 0;
 }
 
 int zpm_notes_available(struct zpm *zpm, int flags) {