Coder Social home page Coder Social logo

Sync readmemory not working about memoryjs HOT 5 CLOSED

rob-- avatar rob-- commented on May 28, 2024
Sync readmemory not working

from memoryjs.

Comments (5)

p410n3 avatar p410n3 commented on May 28, 2024 2

I added a fix for findpattern too. Same problem

EDIT: Its in the pull req I made btw

from memoryjs.

p410n3 avatar p410n3 commented on May 28, 2024 1

Here some more in depth explanation:

The module exports either the async or the synchronous version of the readmemory function here in the index.js of memoryJS:

readMemory(handle, address, dataType, callback) {
  if (arguments.length === 2) {
    return memoryjs.readMemory(handle, address, dataType.toLowerCase());
  }
  memoryjs.readMemory(handle, address, dataType.toLowerCase(), callback);
},

The error is here:
if (arguments.length === 2)
The previous version of memoryJS used only two arguments for the sync function and 3 for the async. So the 2 needs to be a 3, because it assumes I am trying to call the async function, which I am not.

And as you see, without my fix the examples inside the modules throws errors too.

at Object.<anonymous> (X:\Dokumente\p410n3.JS\node_modules\memoryjs\example1.js:86:61)
Given that, I know its an error in memoryJS.

You can confirm this by installing memoryJS and then doing:

cd ./node_modules/memoryjs
node example1.js

from memoryjs.

LiamKarlMitchell avatar LiamKarlMitchell commented on May 28, 2024 1

Confirming, needs to be === 3

from memoryjs.

p410n3 avatar p410n3 commented on May 28, 2024

https://github.com/p410n3/memoryjs/commit/da1c08f46c7bbb536580fc3d05f7c878674db449

from memoryjs.

p410n3 avatar p410n3 commented on May 28, 2024

Fixed in https://github.com/Rob--/memoryjs/pull/24

from memoryjs.

Related Issues (20)

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.