Fix checking integer values by pointer 96/296196/1
authorArtur Świgoń <a.swigon@samsung.com>
Fri, 21 Jul 2023 11:26:26 +0000 (13:26 +0200)
committerArtur Świgoń <a.swigon@samsung.com>
Fri, 21 Jul 2023 11:26:26 +0000 (13:26 +0200)
Change-Id: Iece746f0cce647510791e31f5ca446f0266c6eb0

src/utils.c

index 696e3183da4a9d71613e2a528156fd8eef8563a0..9ad8130a5cb7732d66d79bc1fba7a990a5db3bae 100644 (file)
@@ -356,7 +356,7 @@ Eina_Bool object_get_position_in_table(AtspiAccessible *object, int *row, int *c
                return EINA_FALSE;
        }
 
-       if (row < 0 || column < 0) {
+       if (*row < 0 || *column < 0) {
                ERROR("invalid cell position in table");
                g_object_unref(table_cell);
                return EINA_FALSE;
@@ -372,7 +372,7 @@ Eina_Bool object_get_position_in_table(AtspiAccessible *object, int *row, int *c
        if (table_row_count && table_column_count && table_caption) {
                *table_row_count = atspi_table_get_n_rows(table, NULL);
 
-               if (table_row_count < 0) {
+               if (*table_row_count < 0) {
                        ERROR("invalid row count in table");
                        g_object_unref(table_cell);
                        g_object_unref(table);
@@ -381,7 +381,7 @@ Eina_Bool object_get_position_in_table(AtspiAccessible *object, int *row, int *c
 
                *table_column_count = atspi_table_get_n_columns(table, NULL);
 
-               if (table_column_count < 0) {
+               if (*table_column_count < 0) {
                        ERROR("invalid column count in table");
                        g_object_unref(table_cell);
                        g_object_unref(table);