Skip to content

Conversation

@arhik
Copy link
Contributor

@arhik arhik commented Jan 19, 2026

  • Int64 causes InexactError when passed because of call to UInt64(value) in the body of function.
  • Zigzag-encoded values and float bits are always unsigned integers but might be reachable from a variant of same function in basic.jl.
  • Fixes potential runtime error in bytecode encoding

function encode_signed_varint!(buf::Vector{UInt8}, value::Union{UInt16, UInt32, UInt64})
# For float bits, encode as unsigned varint
encode_varint!(buf, UInt64(value))
end

Fixes #41

- Int64 causes InexactError when passed to UInt64(value)
- Zigzag-encoded values and float bits are always unsigned integers
- Fixes potential runtime error in bytecode encoding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Potential InexactError in encode_signed_varint! with Int64 type

1 participant