From d3c55a54b4c6ed0f740a87e5446e4054888bdcdf Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 31 Aug 2021 03:27:50 +0300 Subject: [PATCH 1/1] Fix incorrect order of memcpy args --- source/binfloat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/binfloat.h b/source/binfloat.h index e50b320..f6e6d1f 100644 --- a/source/binfloat.h +++ b/source/binfloat.h @@ -55,7 +55,7 @@ template inline BinFloat BinFloat::explode_iec559(T v) { typename MatchingInt::Type i; - memcpy(&v, &i, sizeof(T)); + memcpy(&i, &v, sizeof(T)); return explode(i, sizeof(T)*CHAR_BIT); } -- 2.43.0