get a integer from char* ...?

Ok, so now I'm here:

value = ((msg[3] - '0') * 100) + ((msg[4] - '0')*10) + ((msg[5] - '0')*1);

(and value is now an unsigned int)

If i send values over 100 it's fine, but it gets problematic with lower values like 25 because then the 2 is multiplied by 100 and the 5 is multiplied by 10, and the last msg[5] gets the value of -48 which I don't know the reason for.

Is there a method to do this?

My values will keep within the range of 0-255.