From: Mikko Rasa Date: Tue, 31 Aug 2021 00:27:50 +0000 (+0300) Subject: Fix incorrect order of memcpy args X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=commitdiff_plain;h=d3c55a54b4c6ed0f740a87e5446e4054888bdcdf Fix incorrect order of memcpy args --- 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); }