diff options
Diffstat (limited to 'kde-base/arts')
-rw-r--r-- | kde-base/arts/files/arts-1.2.3-buffer.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/kde-base/arts/files/arts-1.2.3-buffer.patch b/kde-base/arts/files/arts-1.2.3-buffer.patch new file mode 100644 index 000000000000..b8bb4a94ec9f --- /dev/null +++ b/kde-base/arts/files/arts-1.2.3-buffer.patch @@ -0,0 +1,27 @@ +--- mcop/buffer.cc.orig 2004-03-24 14:51:23.586055192 +0100 ++++ mcop/buffer.cc 2004-03-24 14:56:14.054897216 +0100 +@@ -87,9 +87,8 @@ + void Buffer::writeFloat(float f) { + // FIXME: on some machines this may fail badly (there is explicit + // float marshalling and demarshalling code in mico/orb/util.cc) +- +- long *f_as_long = (long *)&f; +- writeLong(*f_as_long); ++ union { float f; long l; } u = {f}; ++ writeLong(u.l); + } + + void Buffer::writeFloatSeq(const std::vector<float>& seq) { +@@ -252,9 +251,10 @@ + float Buffer::readFloat() + { + // FIXME: see writeFloat() +- long f_as_long = readLong(); ++ union {float f; long l; } u; ++ u.l = readLong(); + +- if(!_readError) return *(float *)&f_as_long; ++ if(!_readError) return u.f; + return 0.0; + } + |