~broonie/zlib/upstream

« back to all changes in this revision

Viewing changes to inflate.c

  • Committer: Mark Brown
  • Date: 2010-01-24 21:50:04 UTC
  • Revision ID: broonie@finisterre-20100124215004-vcmebis5zyrdg7p7
ImportĀ zlibĀ 1.2.3.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* inflate.c -- zlib decompression
2
 
 * Copyright (C) 1995-2009 Mark Adler
 
2
 * Copyright (C) 1995-2010 Mark Adler
3
3
 * For conditions of distribution and use, see copyright notice in zlib.h
4
4
 */
5
5
 
154
154
    /* set number of window bits, free window if different */
155
155
    if (windowBits && (windowBits < 8 || windowBits > 15))
156
156
        return Z_STREAM_ERROR;
157
 
    if (state->wbits != (unsigned)windowBits && state->window != Z_NULL) {
 
157
    if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) {
158
158
        ZFREE(strm, state->window);
159
159
        state->window = Z_NULL;
160
160
    }