Mercurial > hg > dmlib
changeset 2112:9dc2976e9fa3
Improve probing of packed and unpacked Koala files. Many converters and
tools produce differently sized variants that were previously being
mis-detected.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 25 May 2019 18:57:37 +0300 |
parents | 2d0db1e6b4a7 |
children | 3fcf1c3a3287 |
files | tools/lib64fmts.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/lib64fmts.c Sat May 25 18:40:52 2019 +0300 +++ b/tools/lib64fmts.c Sat May 25 18:57:37 2019 +0300 @@ -65,7 +65,8 @@ { int score = DM_PROBE_SCORE_FALSE; - if (buf->len == 10003) + if (buf->len == 10003 || + buf->len == 10004) score += DM_PROBE_SCORE_MAYBE; if (dmCompareAddr16(buf, 0, fmt->addr)) @@ -79,8 +80,7 @@ { // Attempt to prevent misprobes of unpacked Koala and Run Paint if (buf->len > 30 && - buf->len != 10006 && - buf->len != 10003 && + buf->len < 10002 && dmCompareAddr16(buf, 0, fmt->addr)) return DM_PROBE_SCORE_GOOD;