Created
October 19, 2010 22:23
-
-
Save ebryn/635266 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/tiny_tds/result.c b/ext/tiny_tds/result.c | |
index 7d9f0fa..91f951b 100644 | |
--- a/ext/tiny_tds/result.c | |
+++ b/ext/tiny_tds/result.c | |
@@ -157,8 +157,12 @@ static VALUE rb_tinytds_result_fetch_row(VALUE self, ID timezone, int symbolize_ | |
val = ENCODED_STR_NEW2(converted_unique); | |
break; | |
} | |
- case SYBDATETIME4: | |
- dbconvert(rwrap->client, coltype, data, data_len, SYBDATETIME, data, data_len); | |
+ case SYBDATETIME4: { | |
+ DBDATETIME new_data; | |
+ dbconvert(rwrap->client, coltype, data, data_len, SYBDATETIME, &new_data, sizeof(new_data)); | |
+ data = &new_data; | |
+ data_len = sizeof(new_data); | |
+ } | |
case SYBDATETIME: { | |
DBDATEREC date_rec; | |
dbdatecrack(rwrap->client, &date_rec, (DBDATETIME *)data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment