diff --git a/src/Canvas.cc b/src/Canvas.cc index 9743816..ad1eda0 100644 --- a/src/Canvas.cc +++ b/src/Canvas.cc @@ -224,7 +224,7 @@ Canvas::ToBuffer(const Arguments &args) { return ThrowException(Canvas::Error(status)); } else { Buffer *buf = Buffer::New(closure.len); - memcpy(Buffer::Data(buf->handle_), closure.data, closure.len); + memcpy(Buffer::Data(buf), closure.data, closure.len); closure_destroy(&closure); return buf->handle_; }