diff options
author | Josh Blum | 2013-02-28 21:07:31 -0600 |
---|---|---|
committer | Josh Blum | 2013-02-28 21:07:31 -0600 |
commit | 964ebc0f4c8581b4147a53fdf1bfd7005d91ee2f (patch) | |
tree | 7f61e37435560774bf17af3acf7299f83f96398d /lib | |
parent | 2f2abb4102d442e88ea6b9a63c4c149943832eed (diff) | |
download | sandhi-964ebc0f4c8581b4147a53fdf1bfd7005d91ee2f.tar.gz sandhi-964ebc0f4c8581b4147a53fdf1bfd7005d91ee2f.tar.bz2 sandhi-964ebc0f4c8581b4147a53fdf1bfd7005d91ee2f.zip |
gras: fix buffer stitch edge case issue #51
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gras_impl/input_buffer_queues.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gras_impl/input_buffer_queues.hpp b/lib/gras_impl/input_buffer_queues.hpp index d192a2e..0db5cb4 100644 --- a/lib/gras_impl/input_buffer_queues.hpp +++ b/lib/gras_impl/input_buffer_queues.hpp @@ -273,7 +273,9 @@ GRAS_FORCE_INLINE void InputBufferQueues::push(const size_t i, const SBuffer &bu { SBuffer &b1 = _queues[i][j]; SBuffer &b0 = _queues[i][j-1]; - if (b1.last == b0.get(b0.length)) + //can stitch when last is the end of the front pointer + //and the front also has a last (not accum buffer) + if (b1.last == b0.get(b0.length) and b0.last != 0) { const size_t bytes = b1.length; b0.length += bytes; |