continue;
}
- if (macro_f_utf_byte_width(string[i]) > 1 && i + macro_f_utf_byte_width(string[i]) >= stop) {
+ if (i + macro_f_utf_byte_width(string[i]) > stop) {
return F_status_set_error(F_complete_not_utf_stop);
}
return status;
}
- if (i + macro_f_utf_byte_width(string[i]) >= stop) {
+ if (i + macro_f_utf_byte_width(string[i]) > stop) {
return F_status_set_error(F_complete_not_utf_stop);
}
continue;
}
- if (i + macro_f_utf_byte_width(string[i]) >= stop) {
+ if (i + macro_f_utf_byte_width(string[i]) > stop) {
if (fwrite_unlocked(f_print_sequence_unknown_s.string, 1, f_print_sequence_unknown_s.used, stream) < f_print_sequence_unknown_s.used) {
return F_status_set_error(F_output);
}
return status;
}
- if (status == F_false || i + macro_f_utf_byte_width(string[i]) >= stop) {
+ if (status == F_false || i + macro_f_utf_byte_width(string[i]) > stop) {
if (fwrite_unlocked(f_print_sequence_unknown_s.string, 1, f_print_sequence_unknown_s.used, stream) < f_print_sequence_unknown_s.used) {
return F_status_set_error(F_output);
}
continue;
}
- if (i + macro_f_utf_byte_width(string[i]) >= stop) {
+ if (i + macro_f_utf_byte_width(string[i]) > stop) {
if (fwrite_unlocked(f_print_sequence_unknown_s.string, 1, f_print_sequence_unknown_s.used, stream) < f_print_sequence_unknown_s.used) {
return F_status_set_error(F_output);
}
return status;
}
- if (status == F_false || i + macro_f_utf_byte_width(string[i]) >= stop) {
+ if (status == F_false || i + macro_f_utf_byte_width(string[i]) > stop) {
if (fwrite_unlocked(f_print_sequence_unknown_s.string, 1, f_print_sequence_unknown_s.used, stream) < f_print_sequence_unknown_s.used) {
return F_status_set_error(F_output);
}
continue;
}
- if (i + macro_f_utf_byte_width(string[i]) >= length) {
+ if (i + macro_f_utf_byte_width(string[i]) > length) {
return F_status_set_error(F_complete_not_utf_stop);
}
return status;
}
- if (i + macro_f_utf_byte_width(string[i]) >= length) {
+ if (i + macro_f_utf_byte_width(string[i]) > length) {
return F_status_set_error(F_complete_not_utf_stop);
}
}
status = f_utf_is_whitespace(string + j, length - j);
+ if (F_status_is_error(status)) break;
- if (F_status_is_error(status) || (status == F_false && string[j])) break;
+ if (status == F_false && string[j]) break;
// Search for the next non-NULL character and check if it is a combining character.
if (status == F_true) {
// Print all processed white space (note: control characters are not white space so no checks for this are needed).
while (i < j) {
- if (i + macro_f_utf_byte_width(string[i]) >= length) {
+ if (i + macro_f_utf_byte_width(string[i]) > length) {
if (fwrite_unlocked(f_print_sequence_unknown_s.string, 1, f_print_sequence_unknown_s.used, stream) < f_print_sequence_unknown_s.used) {
return F_status_set_error(F_output);
}
return status;
}
- if (status == F_false || i + macro_f_utf_byte_width(string[i]) >= length) {
+ if (status == F_false || i + macro_f_utf_byte_width(string[i]) > length) {
if (fwrite_unlocked(f_print_sequence_unknown_s.string, 1, f_print_sequence_unknown_s.used, stream) < f_print_sequence_unknown_s.used) {
return F_status_set_error(F_output);
}
// Print all processed white space (note: control characters are not white space so no checks for this are needed).
while (i < j) {
- if (i + macro_f_utf_byte_width(string[i]) >= length) {
+ if (i + macro_f_utf_byte_width(string[i]) > length) {
if (fwrite_unlocked(f_print_sequence_unknown_s.string, 1, f_print_sequence_unknown_s.used, stream) < f_print_sequence_unknown_s.used) {
return F_status_set_error(F_output);
}
return status;
}
- if (status == F_false || i + macro_f_utf_byte_width(string[i]) >= length) {
+ if (status == F_false || i + macro_f_utf_byte_width(string[i]) > length) {
if (fwrite_unlocked(f_print_sequence_unknown_s.string, 1, f_print_sequence_unknown_s.used, stream) < f_print_sequence_unknown_s.used) {
return F_status_set_error(F_output);
}