ndb/note: always track note size, add to_owned

This commit is contained in:
William Casarin committed 2023-12-03 22:12:31 -08:00
1 parent 59cde41764
commit 9c3b052de2
4 files changed
+24 -10

No files matched your search

+1 -1
View File
@@ -84,7 +84,7 @@ enum NostrResponse {
return nil
}
let new_note = note_data.assumingMemoryBound(to: ndb_note.self)
let note = NdbNote(note: new_note, owned_size: Int(len), key: nil)
let note = NdbNote(note: new_note, size: Int(len), owned: true, key: nil)
guard let subid = sized_cstr(cstr: tce.subid, len: tce.subid_len) else {
free(data)