Coder Social home page Coder Social logo

Comments (3)

davedoesdev avatar davedoesdev commented on September 26, 2024

@falcon027 congrats, you found a bug!

I have a fix:

diff --git a/lib/disruptor.js b/lib/disruptor.js
index 92c497c..7bc4418 100644
--- a/lib/disruptor.js
+++ b/lib/disruptor.js
@@ -267,7 +267,7 @@ class DisruptorWriteStream extends Writable {
         }
         let i = 0;
         for (const buf of bufs) {
-            chunk.copy(buf, 0, i, buf.length);
+            chunk.copy(buf, 0, i, i + buf.length);
             i += buf.length;
         }
         if (i === 0) {

I'll publish it soon but I want to get your example into the tests first.

from shared-memory-disruptor.

davedoesdev avatar davedoesdev commented on September 26, 2024

@falcon027 fixed in version 4.1.4

from shared-memory-disruptor.

falcon027 avatar falcon027 commented on September 26, 2024

I appreciate the quick fix, it works now, have a good day.

from shared-memory-disruptor.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.