We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgresNumeric cannot decode large number (like 1234567890123) and it causes runtime crash.
PostgresNumeric
1234567890123
PostgresNumeric(string: "1234567890123")
Can call initializer without crash.
postgres-nio/Sources/PostgresNIO/Data/PostgresData+Numeric.swift
Line 270 in 046d3ba
this function does not work correctly and return values over maxSize.
maxSize
let uuu = "1234567890123" print(uuu.reverseChunked(by: 4)) // ["1", "2345", "67890", "123"]
then here, Int16(67890)! causes crash.
Int16(67890)!
Lines 91 to 95 in 046d3ba
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
PostgresNumeric
cannot decode large number (like1234567890123
) and it causes runtime crash.To Reproduce
Expected behavior
Can call initializer without crash.
Environment
Additional context
postgres-nio/Sources/PostgresNIO/Data/PostgresData+Numeric.swift
Line 270 in 046d3ba
this function does not work correctly and return values over
maxSize
.then here,
Int16(67890)!
causes crash.postgres-nio/Sources/PostgresNIO/Data/PostgresData+Numeric.swift
Lines 91 to 95 in 046d3ba
The text was updated successfully, but these errors were encountered: