Git Product home page Git Product logo

Comments (4)

ygoe avatar ygoe commented on May 20, 2024

I can't follow your code and it contains syntax errors. Here's a cleaned up version of it:

let obj1 = [[100, 1000.01]];
let msg1 = serializeMsgPack(obj1);
let obj2 = [100, 100, "ok", msg1];
let msg2 = serializeMsgPack(obj2);

let obj2_ = deserializeMsgPack(msg2);
let msg1_ = obj2[3];
let obj1_ = deserializeMsgPack(msg1_);

console.log(obj1_[0][1]); // 5.262076770253218e+228

Can you please verify the correctness of my version and that it still produces the wrong result for you? Because this code works as expected for me in Firefox 64 on Windows 10.

If the error remains for you, please specify what environment you used.

from msgpack.js.

SamuelZon258 avatar SamuelZon258 commented on May 20, 2024

chrome 72.0.3626.119(64 bit) for Mac

from msgpack.js.

SamuelZon258 avatar SamuelZon258 commented on May 20, 2024
            console.log("r");
	let obj1 = [[100, 1000.01]];
	let msg1 = serializeMsgPack(obj1);
	let obj2 = [100, 100, "ok", msg1];
	let msg2 = serializeMsgPack(obj2);

	let obj2_ = deserializeMsgPack(msg2);
	let msg1_ = obj2_[3];
	let obj1_ = deserializeMsgPack(msg1_);

	console.log(obj1_[0][1]); // 5.262076770253218e+228

log:
r
5.262076770253218e+228

from msgpack.js.

ygoe avatar ygoe commented on May 20, 2024

Sorry, I can't reproduce this. The closest environment I have is Chrome 72.0.3626.109 (64 bit) on Windows 10. For me, the log prints the expected "1000.01", as it does in Firefox. So I'd suggest you report the bug in Chrome for Mac.

from msgpack.js.

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.