From 4bf3df94f8b344ccc84bcaeb89541701de020905 Mon Sep 17 00:00:00 2001 From: Zed Date: Wed, 4 Mar 2026 17:27:15 +0100 Subject: [PATCH] Fix segfault --- src/api.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api.nim b/src/api.nim index c9a6f59..ed19835 100644 --- a/src/api.nim +++ b/src/api.nim @@ -170,7 +170,8 @@ proc getGraphTweetSearch*(query: Query; after=""): Future[Timeline] {.async.} = # when no more items are available the API just returns the last page in # full. this detects that and clears the page instead. - if after.len > 0 and after[0..<64] == result.bottom[0..<64]: + if after.len > 0 and result.bottom.len > 0 and + after[0..<64] == result.bottom[0..<64]: result.content.setLen(0) proc getGraphUserSearch*(query: Query; after=""): Future[Result[User]] {.async.} =