8000 Fix types for debug builds which were broken by 778e8bbb · coderforlife/ms-compress@303a7d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 303a7d5

Browse files
committed
Fix types for debug builds which were broken by 778e8bb
1 parent 43d33ab commit 303a7d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/xpress_compress.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ MSCompStatus xpress_deflate_init(mscomp_stream* stream)
6666
//if (!(d = new (d) DictionaryStatic())->Initialized()) { free(state); d->~DictionaryStatic(); free(d); SET_ERROR(stream, "XPRESS Compression Error: Unable to allocate dictionary memory"); return MSCOMP_MEM_ERROR; }
6767
//state->d = d;
6868

69-
stream->state = state;
69+
stream->state = (mscomp_internal_state*) state;
7070
return MSCOMP_OK;
7171
#else
7272
return MSCOMP_MEM_ERROR;
@@ -81,10 +81,10 @@ ENTRY_POINT MSCompStatus xpress_deflate(mscomp_stream* stream, MSCompFlush flush
8181
// of 10 the next time a length 10+ match is found). This adds at most 2 bytes to the output
8282
// for data that is already not compressing well (each time it occurs).
8383
#ifdef _XDEBUG
84-
CHECK_STREAM_PLUS(stream, true, MSCOMP_XPRESS, stream->state == NULL || stream->state->finished);
85-
8684
mscomp_xpress_compress_state *state = (mscomp_xpress_compress_state*) stream->state;
8785

86+
CHECK_STREAM_PLUS(stream, true, MSCOMP_XPRESS, state == NULL || state->finished);
87+
8888
const size_t out_avail = stream->out_avail;
8989
const_bytes in = stream->in; const const_bytes in_end = in +stream->in_avail;
9090
bytes out = stream->out; const bytes out_end = out+stream->out_avail;

0 commit comments

Comments
 (0)
0