Karl Williamson <public@khwilliamson.com> wrote: : Then the loop innards would look like: : : while (s < e) { : code_point = next_uvchr(s, e, &retlen); : : if (retlen < 0) { I'd recommend making this `if (retlen <= 0) {` or otherwise handling the retlen == 0 case, even if you only expect that when s >= e: the function should be capable of doing something reasonable on an empty string, which probably means not croaking. : ... process error ... : retlen = -retlen; : } HugoThread Previous | Thread Next