Created
April 20, 2013 16:42
-
-
Save jvilk/5426578 to your computer and use it in GitHub Desktop.
This code snippet appears to be nondeterministic in Node. Maybe I'm doing something wrong?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var buff = new Buffer(2); | |
buff[0] = 256; | |
console.log(buff[0]); | |
console.log(buff[1]); | |
buff.write("Ā", 0, 1); | |
console.log(buff[0]); | |
console.log(buff[1]); | |
console.log(buff.readInt8(0)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh. I guess it just doesn't initialize the buffer, now that I think of it.