diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/win32ole/win32ole.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index 17d61a7769..7fd9181405 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -116,7 +116,7 @@ #define WC2VSTR(x) ole_wc2vstr((x), TRUE) -#define WIN32OLE_VERSION "1.1.6" +#define WIN32OLE_VERSION "1.1.7" typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX) (REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*); @@ -768,12 +768,10 @@ static VALUE date2time_str(double date) { int y, m, d, hh, mm, ss; - char szTime[20]; double2time(date, &y, &m, &d, &hh, &mm, &ss); - sprintf(szTime, + return rb_sprintf( "%04d/%02d/%02d %02d:%02d:%02d", y, m, d, hh, mm, ss); - return rb_str_new2(szTime); } #define ENC_MACHING_CP(enc,encname,cp) if(strcasecmp(rb_enc_name((enc)),(encname)) == 0) return cp |