aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/zran.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/zran.c b/examples/zran.c
index 2afc2fe..6ce75dd 100644
--- a/examples/zran.c
+++ b/examples/zran.c
@@ -1,7 +1,7 @@
1/* zran.c -- example of deflate stream indexing and random access 1/* zran.c -- example of deflate stream indexing and random access
2 * Copyright (C) 2005, 2012, 2018, 2023, 2024 Mark Adler 2 * Copyright (C) 2005, 2012, 2018, 2023, 2024 Mark Adler
3 * For conditions of distribution and use, see copyright notice in zlib.h 3 * For conditions of distribution and use, see copyright notice in zlib.h
4 * Version 1.5 4 Feb 2024 Mark Adler */ 4 * Version 1.6 2 Aug 2024 Mark Adler */
5 5
6/* Version History: 6/* Version History:
7 1.0 29 May 2005 First version 7 1.0 29 May 2005 First version
@@ -18,6 +18,7 @@
18 Stop decoding once request is satisfied 18 Stop decoding once request is satisfied
19 Provide a reusable inflate engine in the index 19 Provide a reusable inflate engine in the index
20 Allocate the dictionaries to reduce memory usage 20 Allocate the dictionaries to reduce memory usage
21 1.6 2 Aug 2024 Remove unneeded dependency on limits.h
21 */ 22 */
22 23
23// Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary() 24// Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary()
@@ -61,7 +62,6 @@
61#include <stdio.h> 62#include <stdio.h>
62#include <stdlib.h> 63#include <stdlib.h>
63#include <string.h> 64#include <string.h>
64#include <limits.h>
65#include "zlib.h" 65#include "zlib.h"
66#include "zran.h" 66#include "zran.h"
67 67
@@ -390,8 +390,8 @@ ptrdiff_t deflate_index_extract(FILE *in, struct deflate_index *index,
390 } 390 }
391 else { 391 else {
392 // Uncompress up to left bytes into buf. 392 // Uncompress up to left bytes into buf.
393 index->strm.avail_out = left < UINT_MAX ? (unsigned)left : 393 index->strm.avail_out = left < (unsigned)-1 ? (unsigned)left :
394 UINT_MAX; 394 (unsigned)-1;
395 index->strm.next_out = buf + len - left; 395 index->strm.next_out = buf + len - left;
396 } 396 }
397 397