Skip to content

Commit 7185807

Browse files
committed
memcpy in case unaligned
1 parent 40a66a5 commit 7185807

File tree

1 file changed

+1
-1
lines changed
  • quaddtype/numpy_quaddtype/src

1 file changed

+1
-1
lines changed

quaddtype/numpy_quaddtype/src/dtype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ quadprec_get_constant(PyArray_Descr *descr, int constant_id, void *ptr)
257257
}
258258

259259
/* Store the Sleef_quad value to the provided pointer */
260-
*(Sleef_quad *)ptr = val;
260+
memcpy(ptr, &val, sizeof(Sleef_quad));
261261
return 1;
262262
}
263263

0 commit comments

Comments
 (0)