diff options
Diffstat (limited to 'platform/ios/Classes')
-rw-r--r-- | platform/ios/Classes/MuPageViewReflow.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/ios/Classes/MuPageViewReflow.m b/platform/ios/Classes/MuPageViewReflow.m index c5963f2f..f58bf72f 100644 --- a/platform/ios/Classes/MuPageViewReflow.m +++ b/platform/ios/Classes/MuPageViewReflow.m @@ -12,6 +12,8 @@ NSString *textAsHtml(fz_document *doc, int pageNum) fz_buffer *buf = NULL; fz_output *out = NULL; fz_rect mediabox; + size_t len; + unsigned char *data; fz_var(page); fz_var(sheet); @@ -55,7 +57,8 @@ NSString *textAsHtml(fz_document *doc, int pageNum) out = NULL; - str = [[[NSString alloc] initWithBytes:buf->data length:buf->len encoding:NSUTF8StringEncoding] autorelease]; + len = fz_buffer_storage(ctx, buf, &data); + str = [[[NSString alloc] initWithBytes:data length:len encoding:NSUTF8StringEncoding] autorelease]; } fz_always(ctx) { |