|
@@ -118,7 +118,7 @@ static int pdu_7bit_encode(str sin) {
|
|
|
nleft = 1;
|
|
|
j = 0;
|
|
|
for(i = 0; i < sin.len; i++) {
|
|
|
- hex = *(sin.s) >> (nleft - 1);
|
|
|
+ hex = (unsigned char)(*(sin.s)) >> (nleft - 1);
|
|
|
fill = *(sin.s+1) << (8-nleft);
|
|
|
hex = hex | fill;
|
|
|
_tr_buffer[j++] = HexTbl[hex >> 4];
|
|
@@ -292,7 +292,7 @@ int tr_eval_string(struct sip_msg *msg, tr_param_t *tp, int subtype,
|
|
|
j = 0;
|
|
|
for(i=0; i<val->rs.len; i++)
|
|
|
{
|
|
|
- _tr_buffer[j++] = fourbits2char[val->rs.s[i] >> 4];
|
|
|
+ _tr_buffer[j++] = fourbits2char[(unsigned char)val->rs.s[i] >> 4];
|
|
|
_tr_buffer[j++] = fourbits2char[val->rs.s[i] & 0xf];
|
|
|
}
|
|
|
_tr_buffer[j] = '\0';
|