Changeset 5600


Ignore:
Timestamp:
Jun 5, 2017 7:27:45 AM (7 years ago)
Author:
riza
Message:

Re #1994(misc): Method pj_hash_calc_tolower() might return a different hash
value. Thanks to Fredrik Hansson for the report.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/hash.c

    r5494 r5600  
    7878 
    7979    for (i=0; i<key->slen; ++i) { 
    80         char lower = (char)pj_tolower(key->ptr[i]); 
     80        int lower = pj_tolower(key->ptr[i]); 
    8181        if (result) 
    82             result[i] = lower; 
     82            result[i] = (char)lower; 
     83 
    8384        hval = hval * PJ_HASH_MULTIPLIER + lower; 
    8485    } 
Note: See TracChangeset for help on using the changeset viewer.