From d1f95de93fe91b452e1ba3913f913e339b66af30 Mon Sep 17 00:00:00 2001 From: Jenny Tam Date: Tue, 26 Jun 2018 15:14:34 -0700 Subject: [PATCH] Changed int to SQLLEN to avoid infinite loop --- source/shared/core_results.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/shared/core_results.cpp b/source/shared/core_results.cpp index 85a4ecdab..fc9935d5f 100644 --- a/source/shared/core_results.cpp +++ b/source/shared/core_results.cpp @@ -964,7 +964,7 @@ SQLRETURN binary_to_string( _Inout_ SQLCHAR* field_data, _Inout_ SQLLEN& read_so // to_copy contains the number of bytes to copy, so we divide the number in half (or quarter) // to get the number of hex digits we can copy SQLLEN to_copy_hex = to_copy / (2 * extra); - for( int i = 0; i < to_copy_hex; ++i ) { + for( SQLLEN i = 0; i < to_copy_hex; ++i ) { *h = hex_chars[ (*b & 0xf0) >> 4 ]; h++; *h = hex_chars[ (*b++ & 0x0f) ];