Fixed encoding issue

This commit is contained in:
Mikael Ganehag Brorsson 2014-12-05 23:12:25 +01:00
parent cae5328aff
commit f8ccef0100

View File

@ -241,8 +241,8 @@ JsVar *jswrap_hashlib_hash_hexdigest(const JsVar *parent) {
for(i = 0; i < hashFunctions[type].digest_size; i++) {
char c[2];
c[0] = a[ buff[i] >> 4 ];
c[1] = a[ buff[i] & 0x0F ];
c[0] = a[ (unsigned char)(buff[i]) >> 4 ];
c[1] = a[ (unsigned char)(buff[i]) & 0x0F ];
jsvAppendStringBuf(digest, c, sizeof(c));
}