diff options
Diffstat (limited to 'DevIL/src-IL/src/il_jp2.cpp')
-rw-r--r-- | DevIL/src-IL/src/il_jp2.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/DevIL/src-IL/src/il_jp2.cpp b/DevIL/src-IL/src/il_jp2.cpp index 3fd397ba..aa38c839 100644 --- a/DevIL/src-IL/src/il_jp2.cpp +++ b/DevIL/src-IL/src/il_jp2.cpp @@ -383,7 +383,7 @@ jas_stream_t *iJp2ReadStream() stream->ops_ = &jas_stream_devilops; /* Allocate memory for the underlying memory stream object. */ - if (!(obj = jas_malloc(sizeof(jas_stream_memobj_t)))) { + if (!(obj = (jas_stream_memobj_t*)jas_malloc(sizeof(jas_stream_memobj_t)))) { jas_stream_destroy(stream); return 0; } @@ -440,7 +440,7 @@ static void jas_stream_initbuf(jas_stream_t *stream, int bufmode ) if (bufmode != JAS_STREAM_UNBUF) { /* The full- or line-buffered mode is being employed. */ - if ((stream->bufbase_ = jas_malloc(JAS_STREAM_BUFSIZE + + if ((stream->bufbase_ = (unsigned char*)jas_malloc(JAS_STREAM_BUFSIZE + JAS_STREAM_MAXPUTBACK))) { stream->bufmode_ |= JAS_STREAM_FREEBUF; stream->bufsize_ = JAS_STREAM_BUFSIZE; @@ -466,7 +466,7 @@ static jas_stream_t *jas_stream_create() { jas_stream_t *stream; - if (!(stream = jas_malloc(sizeof(jas_stream_t)))) { + if (!(stream = (jas_stream_t*)jas_malloc(sizeof(jas_stream_t)))) { return 0; } stream->openmode_ = 0; @@ -519,7 +519,7 @@ jas_stream_t *iJp2WriteStream() stream->ops_ = &jas_stream_devilops; /* Allocate memory for the underlying memory stream object. */ - if (!(obj = jas_malloc(sizeof(jas_stream_memobj_t)))) { + if (!(obj = (jas_stream_memobj_t*)jas_malloc(sizeof(jas_stream_memobj_t)))) { jas_stream_destroy(stream); return 0; } |