diff options
Diffstat (limited to 'ext/win32ole')
-rw-r--r-- | ext/win32ole/win32ole.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index e3912bcdad..c42e9f9a29 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -7131,12 +7131,13 @@ folevariant_value(self) if ((vt & ~VT_BYREF) == (VT_UI1|VT_ARRAY)) { SAFEARRAY *psa; + int dim; if (vt & VT_BYREF) { psa = *V_ARRAYREF(&(pvar->var)); } else { psa = V_ARRAY(&(pvar->var)); } - int dim = SafeArrayGetDim(psa); + dim = SafeArrayGetDim(psa); if (dim == 1) { VALUE args = rb_ary_new3(1, rb_str_new2("C*")); val = rb_apply(val, rb_intern("pack"), args); |