]> git.tdb.fi Git - libs/datafile.git/commitdiff
Fix incorrect order of memcpy args
authorMikko Rasa <tdb@tdb.fi>
Tue, 31 Aug 2021 00:27:50 +0000 (03:27 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 31 Aug 2021 00:27:50 +0000 (03:27 +0300)
source/binfloat.h

index e50b3204ce974e992ca3cb52f5089456d8b16b39..f6e6d1fb5b493a045022fefc7af2c1ecc2aec335 100644 (file)
@@ -55,7 +55,7 @@ template<typename T>
 inline BinFloat BinFloat::explode_iec559(T v)
 {
        typename MatchingInt<T>::Type i;
-       memcpy(&v, &i, sizeof(T));
+       memcpy(&i, &v, sizeof(T));
        return explode(i, sizeof(T)*CHAR_BIT);
 }