Browse Source

Update Image.cc

fix fopen mode for non-POSIX platform
v1.x
Matthieu Dehaussy 10 years ago
parent
commit
372fb699f0
  1. 2
      src/Image.cc

2
src/Image.cc

@ -392,7 +392,7 @@ Image::error(Local<Value> err) {
cairo_status_t cairo_status_t
Image::loadSurface() { Image::loadSurface() {
FILE *stream = fopen(filename, "r"); FILE *stream = fopen(filename, "rb");
if (!stream) return CAIRO_STATUS_READ_ERROR; if (!stream) return CAIRO_STATUS_READ_ERROR;
uint8_t buf[5]; uint8_t buf[5];
if (1 != fread(&buf, 5, 1, stream)) { if (1 != fread(&buf, 5, 1, stream)) {

Loading…
Cancel
Save