[BACK]Return to utf8-combined.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/utf8-combined.c between version 1.1 and 1.2

version 1.1, 2023/09/01 14:29:11 version 1.2, 2023/09/01 18:43:54
Line 962 
Line 962 
                 return (-1);                  return (-1);
         if (ud1->size > ud2->size)          if (ud1->size > ud2->size)
                 return (1);                  return (1);
         return (memcmp(ud1->data, ud2->data, sizeof *ud1->data));          return (memcmp(ud1->data, ud2->data, ud1->size));
 }  }
 RB_HEAD(utf8_combined_tree, utf8_combined_first);  RB_HEAD(utf8_combined_tree, utf8_combined_first);
 RB_GENERATE_STATIC(utf8_combined_tree, utf8_combined_first, entry,  RB_GENERATE_STATIC(utf8_combined_tree, utf8_combined_first, entry,
Line 979 
Line 979 
                 return (-1);                  return (-1);
         if (ud1->size > ud2->size)          if (ud1->size > ud2->size)
                 return (1);                  return (1);
         return (memcmp(ud1->data, ud2->data, sizeof *ud1->data));          return (memcmp(ud1->data, ud2->data, ud1->size));
 }  }
   
 static int  static int
Line 1035 
Line 1035 
                 wc = utf8_combined_table[i].first;                  wc = utf8_combined_table[i].first;
                 mlen = wctomb(first.data, wc);                  mlen = wctomb(first.data, wc);
                 if (mlen <= 0 || mlen > UTF8_SIZE) {                  if (mlen <= 0 || mlen > UTF8_SIZE) {
                         log_debug("invalid combined character %08X", wc);                          log_debug("invalid combined character %05X", wc);
                         continue;                          continue;
                 }                  }
                 first.size = mlen;                  first.size = mlen;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2