The test at line 288 in skytraq_rd_msg is always true because rcv_len is unsigned.  Does someone more familiar with this format want to resolve this?

    265 static int
    266 skytraq_rd_msg(const void* payload, unsigned int len)
    267 {
    268   int errors = 5;       /* allow this many errors */
    269   unsigned int c, i, state;
    270   unsigned int rcv_len, calc_cs, rcv_cs;
    271
    272   for (i = 0, state = 0; i < RETRIES && state < sizeof(MSG_START); i++) {
    273     c = rd_char(&errors);
    274     if (c == MSG_START[state]) {
    275       state++;
    276     } else if (c == MSG_START[0]) {
    277       state = 1;
    278     } else {
    279       state = 0;
    280     }
    281   }
    282   if (state < sizeof(MSG_START)) {
    283     db(1, MYNAME ": Didn't get message start tag\n");
    284     return res_ERROR;
    285   }
    286
    287   if ((rcv_len = rd_word()) < len) {
    288     if (rcv_len >= 0) { /* negative values indicate receive errors */
    289       db(1, MYNAME ": Received message too short (got %i bytes, expected %i)\n",
    290          rcv_len, len);
    291       return res_PROTOCOL_ERR;
    292     }
    293     return res_ERROR;
    294   }