You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by th...@apache.org on 2011/10/12 15:04:53 UTC

svn commit: r1182347 - in /avro/trunk: CHANGES.txt lang/c++/api/buffer/BufferStreambuf.hh

Author: thiru
Date: Wed Oct 12 13:04:53 2011
New Revision: 1182347

URL: http://svn.apache.org/viewvc?rev=1182347&view=rev
Log:
AVRO-916. 0xff in binary stream is interpreted as end-of-stream

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/c++/api/buffer/BufferStreambuf.hh

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1182347&r1=1182346&r2=1182347&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Wed Oct 12 13:04:53 2011
@@ -147,6 +147,8 @@ Avro 1.6.0 (unreleased)
     AVRO-871. Fix specification to state that enum symbol names must
     follow the same rules as record and field names.  (cutting)
 
+    AVRO-916. 0xff in binary stream is interpreted as end-of-stream. (thiru)
+
 Avro 1.5.4 (12 September 2011)
 
   IMPROVEMENTS

Modified: avro/trunk/lang/c++/api/buffer/BufferStreambuf.hh
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c%2B%2B/api/buffer/BufferStreambuf.hh?rev=1182347&r1=1182346&r2=1182347&view=diff
==============================================================================
--- avro/trunk/lang/c++/api/buffer/BufferStreambuf.hh (original)
+++ avro/trunk/lang/c++/api/buffer/BufferStreambuf.hh Wed Oct 12 13:04:53 2011
@@ -234,7 +234,7 @@ class istreambuf : public std::streambuf
         if(iter_ != buffer_.end()) {
             char *loc = const_cast <char *> (iter_->data()) ;
             setg(loc, loc, loc + iter_->size());
-            ret = *gptr();
+            ret = std::char_traits<char>::to_int_type(*gptr());
         }
         else {
             setg(0,0,0);