summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/dl/ptr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dl/ptr.c b/ext/dl/ptr.c
index e1cd937d49b..a6af30112dc 100644
--- a/ext/dl/ptr.c
+++ b/ext/dl/ptr.c
@@ -638,7 +638,7 @@ cary2ary(void *ptr, char t, int len)
ptr = (char *)ptr + sizeof(float);
break;
case 'D':
- elem = rb_float_new(*((float*)ptr));
+ elem = rb_float_new(*((double*)ptr));
ptr = (char *)ptr + sizeof(double);
break;
case 'C':