[A] Added more checks

This commit is contained in:
seleznevae
2018-11-18 11:32:07 +03:00
parent 6fb83bc58f
commit 4c7eef8081
4 changed files with 10 additions and 3 deletions

View File

@@ -307,8 +307,8 @@ FT_INTERNAL
size_t buffer_text_width(string_buffer_t *buffer)
{
size_t max_length = 0;
int n = 0;
if (buffer->type == CharBuf) {
int n = 0;
while (1) {
const char *beg = NULL;
const char *end = NULL;
@@ -321,6 +321,7 @@ size_t buffer_text_width(string_buffer_t *buffer)
}
#ifdef FT_HAVE_WCHAR
} else {
int n = 0;
while (1) {
const wchar_t *beg = NULL;
const wchar_t *end = NULL;

View File

@@ -110,6 +110,7 @@ fort_status_t get_table_sizes(const ft_table_t *table, size_t *rows, size_t *col
*rows = vector_size(table->rows);
fort_row_t *row = NULL;
FOR_EACH(fort_row_t *, row, table->rows) {
(void)i0;
size_t cols_in_row = columns_in_row(row);
if (cols_in_row > *cols)
*cols = cols_in_row;