Before this change, telebot would crash because in unmarshal in utils it's using getInt which uses architecture's native int size, but Telegram has some types that are 64-bit, so the code needs to use getBiggestInt instead.
Also changed the code so that it does a type conversion instead of a cast which is safer.
I'm not sure if there are any other bugs regarding 32-bit compatibility, but with this one the basic echo bot at least works fine.
Before this change, telebot would crash because in
unmarshal
in utils it's usinggetInt
which uses architecture's native int size, but Telegram has some types that are 64-bit, so the code needs to usegetBiggestInt
instead.Also changed the code so that it does a type conversion instead of a cast which is safer.
I'm not sure if there are any other bugs regarding 32-bit compatibility, but with this one the basic echo bot at least works fine.