Changed int to SQLLEN to avoid infinite loop (#806)

This commit is contained in:
Jenny Tam 2018-06-27 11:03:30 -07:00 committed by GitHub
parent eeea7878fb
commit ae0b95b757
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) ];