Remove redundant check in hbu_buffer_valid_index

This commit is contained in:
Wilson Lin 2018-07-05 19:53:00 +12:00
parent d68953cb26
commit b56cbceb8b
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ hb_char_t *hbu_buffer_underlying(hbu_buffer_t buf) {
}
int hbu_buffer_valid_index(hbu_buffer_t buf, size_t idx) {
return idx >= 0 && idx < buf->length;
return idx < buf->length;
}
hb_eod_char_t hbu_buffer_get(hbu_buffer_t buf, size_t idx) {