summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2020-07-03 20:31:36 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2020-08-14 22:20:50 +0200
commit2928d96e2a950f81ade2ff198a11800d2168b983 (patch)
tree6b4e6f60ea9a47719ad446e2a8bac9a8728bcc67
parent62e2fb1b64752702c65f6714bd70cbad4470dde7 (diff)
downloadProject-Tick-2928d96e2a950f81ade2ff198a11800d2168b983.tar.gz
Project-Tick-2928d96e2a950f81ade2ff198a11800d2168b983.zip
Fixed possible loss of data warning in LONGEST_MATCH.
match_tpl.h(69,64): warning C4244: '=': conversion from 'unsigned int' to 'Pos', possible loss of data
-rw-r--r--match_tpl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/match_tpl.h b/match_tpl.h
index ddfaf4082b..24bf01de79 100644
--- a/match_tpl.h
+++ b/match_tpl.h
@@ -66,7 +66,7 @@ ZLIB_INTERNAL int32_t LONGEST_MATCH(deflate_state *const s, Pos cur_match) {
* Stop when cur_match becomes <= limit. To simplify the code,
* we prevent matches with the string of window index 0
*/
- limit = strstart > MAX_DIST(s) ? strstart - MAX_DIST(s) : 0;
+ limit = strstart > MAX_DIST(s) ? (Pos)(strstart - MAX_DIST(s)) : 0;
scan_start = *(bestcmp_t *)(scan);
scan_end = *(bestcmp_t *)(scan+best_len-1);