Fix mixed signed/unsigned comparisons Force both operands to unsigned. n_codepoints does not seem to ever contain negative offsets anyhow, should it actually be unsigned?
diff --git a/src/md4c.c b/src/md4c.c
index d7b814a..2be567b 100644
--- a/src/md4c.c
+++ b/src/md4c.c
@@ -1614,12 +1614,12 @@ md_link_label_cmp(const CHAR* a_label, SZ a_size, const CHAR* b_label, SZ b_size
b_off = md_skip_unicode_whitespace(b_label, 0, b_size);
while(!a_reached_end || !b_reached_end) {
/* If needed, load fold info for next char. */
- if(a_fi_off >= a_fi.n_codepoints) {
+ if(a_fi_off >= (OFF)a_fi.n_codepoints) {
a_fi_off = 0;
a_off = md_link_label_cmp_load_fold_info(a_label, a_off, a_size, &a_fi);
a_reached_end = (a_off >= a_size);
}
- if(b_fi_off >= b_fi.n_codepoints) {
+ if(b_fi_off >= (OFF)b_fi.n_codepoints) {
b_fi_off = 0;
b_off = md_link_label_cmp_load_fold_info(b_label, b_off, b_size, &b_fi);
b_reached_end = (b_off >= b_size);