From 84f3ff1d8f76ba6f764a6b2fa164c40aba54c28a Mon Sep 17 00:00:00 2001
From: Frediano Ziglio <freddy77@gmail.com>
Date: Sun, 17 Mar 2019 19:02:35 +0000
Subject: [PATCH] ctlib: Fix cs_will_convert

Use CT-Library types, not TDS ones.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
---
 src/ctlib/cs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/ctlib/cs.c b/src/ctlib/cs.c
index 30dd2de0..70c314c1 100644
--- a/src/ctlib/cs.c
+++ b/src/ctlib/cs.c
@@ -1293,6 +1293,8 @@ cs_will_convert(CS_CONTEXT * ctx, CS_INT srctype, CS_INT desttype, CS_BOOL * res
 
 	tdsdump_log(TDS_DBG_FUNC, "cs_will_convert(%p, %d, %d, %p)\n", ctx, srctype, desttype, result);
 
+	srctype = _ct_get_server_type(NULL, srctype);
+	desttype = _ct_get_server_type(NULL, desttype);
 	*result = (tds_willconvert(srctype, desttype) ? CS_TRUE : CS_FALSE);
 	return CS_SUCCEED;
 }
-- 
2.27.0

