do not need to check dataLen re: OOM error (and the check was incorrect anyway)

This commit is contained in:
Michael Bradley, Jr 2022-07-13 17:11:20 -05:00
parent a68c4caa8e
commit a73c58c632
No known key found for this signature in database
GPG Key ID: D0307DBCF21A9A58

View File

@ -160,15 +160,6 @@ proc dataCol*(
let
dataLen = sqlite3_column_bytes(s, i)
# an out-of-memory error can be inferred from a null pointer result
if (unsafeAddr dataLen).isNil:
let
code = sqlite3_errcode(sqlite3_db_handle(s))
raise (ref Defect)(msg: $sqlite3_errstr(code))
let
dataBytes = cast[ptr UncheckedArray[byte]](blob)
@(toOpenArray(dataBytes, 0, dataLen - 1))