TooTallNate / ref

Turn Buffer instances into "pointers"
http://tootallnate.github.com/ref
454 stars 142 forks source link

fix readPointer example #90

Closed jcupitt closed 7 years ago

jcupitt commented 7 years ago

The readPointer example was a bit mixed up: it wasn't really doing anything. I changed it to be what (I think) was intended. I now see:

var buf = new Buffer('hello world'); undefined var pointer = ref.alloc('pointer', buf); undefined var buf2 = ref.readPointer(pointer, 0, buf.length); undefined buf2.toString() 'hello world'

TooTallNate commented 7 years ago

Yes, good catch! Thank you @jcupitt.