damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 0178478199706ac1921bda0815697590391322b9
parent d489bcc58688dafef97fda85efa7a8eaf900c3d0
Author: William Casarin <jb55@jb55.com>
Date:   Sun,  6 Aug 2023 06:45:31 -0700

decoding: fix decoding of large events like nostr reports

I was trying to do an initial malloc that was somewhat efficient. Looks
like our ndb_builder needs a bit more space when allocating the
ndb_note.

Changelog-Fixed: Fixed nostr reporting decoding

Diffstat:
Mdamus/Nostr/NostrResponse.swift | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/damus/Nostr/NostrResponse.swift b/damus/Nostr/NostrResponse.swift @@ -39,7 +39,7 @@ enum NostrResponse { static func owned_from_json(json: String) -> NostrResponse? { return json.withCString{ cstr in - let bufsize: Int = max(Int(Double(json.utf8.count) * 2.0), Int(getpagesize())) + let bufsize: Int = max(Int(Double(json.utf8.count) * 4.0), Int(getpagesize())) let data = malloc(bufsize) if data == nil {