Mercurial > hg-stable
changeset 13730:df978f28a259
bdiff.c: cast to unsigned char when computing hash value
author | Markus F.X.J. Oberhumer <markus@oberhumer.com> |
---|---|
date | Wed, 23 Mar 2011 02:33:22 +0100 |
parents | 4a9c09239ba1 |
children | 5d0cdf4ec338 |
files | mercurial/bdiff.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bdiff.c Wed Mar 23 02:33:21 2011 +0100 +++ b/mercurial/bdiff.c Wed Mar 23 02:33:22 2011 +0100 @@ -84,7 +84,7 @@ h = 0; for (p = a; p < a + len; p++) { /* Leonid Yuriev's hash */ - h = (h * 1664525) + *p + 1013904223; + h = (h * 1664525) + (unsigned char)*p + 1013904223; if (*p == '\n' || p == plast) { l->h = h;