diff options
Diffstat (limited to 'src/corelib/io/qdatastream.cpp')
-rw-r--r-- | src/corelib/io/qdatastream.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp index 2e5a406..8b23479 100644 --- a/src/corelib/io/qdatastream.cpp +++ b/src/corelib/io/qdatastream.cpp @@ -1132,8 +1132,12 @@ QDataStream &QDataStream::operator<<(float f) } x; x.val1 = g; x.val2 = qbswap(x.val2); - g = x.val1; + + if (dev->write((char *)&x.val2, sizeof(float)) != sizeof(float)) + q_status = WriteFailed; + return *this; } + if (dev->write((char *)&g, sizeof(float)) != sizeof(float)) q_status = WriteFailed; return *this; |