v7 icon indicating copy to clipboard operation
v7 copied to clipboard

Code never executed in fullrune()

Open swisspol opened this issue 8 years ago • 1 comments

int fullrune(const char *str, int n) {
  int c;

  if (n <= 0) return 0;
  c = *(uchar *) str;
  if (c < Tx) return 1;
  if (c < T3) return n >= 2;
  if (UTFmax == 3 || c < T4) return n >= 3;  <------- Always passes since `UTFmax` is 3
  return n >= 4;
}

swisspol avatar Dec 05 '15 15:12 swisspol