diff options
Diffstat (limited to 'lib/buffer.js')
-rw-r--r-- | lib/buffer.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/buffer.js b/lib/buffer.js index dce0862d9..13f701ba2 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -88,6 +88,12 @@ function Buffer(subject, encoding) { poolOffset, poolOffset + this.length); poolOffset += this.length; + + // Ensure aligned slices + if (poolOffset & 0x7) { + poolOffset |= 0x7; + poolOffset++; + } } else { alloc(this, this.length); } |