card_id: usize is not enough #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have been getting errors when I use guiCurrentCard and other note/card related APIs, it turns out my note id are outside of the range of usize:
And my collection isn't that big, around 12k cards at most.
@Madoshakalaka Are you on a 32-bit system per chance?
According to usize definition, the maximum representation is
18446744073709551615(2^64 − 1) on 64-bit targets. For 32-bit, it would be4294967295(2^32 − 1), which is less than your card id1687816895442.If not, can you share an example that reproduces this?
OHHH, I'm on my 64 bit PC but I was actually using anki_bridge in wasm with reqwest_async, compiled into an web-app in the browser, that must be why.
I cloned the code and changed it to u64 and it worked well
(And I had to tweak the code a bit, had to do
maybe_async(?Send)in wasm for example)