- while (ao_gps_num_width < max_width) {
- if ('0' <= ao_gps_char && ao_gps_char <= '9')
- d = ao_gps_char - '0';
- else if ('A' <= ao_gps_char && ao_gps_char <= 'F')
- d = ao_gps_char - 'A' + 10;
- else if ('a' <= ao_gps_char && ao_gps_char <= 'f')
- d = ao_gps_char - 'a' + 10;
+ while (ao_gps_num_width < 2) {
+ uint8_t c = ao_gps_char;
+ uint8_t d;
+ if ((uint8_t) '0' <= c && c <= (uint8_t) '9')
+ d = - '0';
+ else if ((uint8_t) 'A' <= c && c <= (uint8_t) 'F')
+ d = - 'A' + 10;
+ else if ((uint8_t) 'a' <= c && c <= (uint8_t) 'f')
+ d = - 'a' + 10;