Browse Source

In easycsv_print_columns/rows, check NULL pointer

Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
redesign
Pradana AUMARS 10 months ago
parent
commit
006cd346e9
  1. 14
      src/easycsv.c

14
src/easycsv.c

@ -240,13 +240,23 @@ easycsv_read_value(const easycsv *csv,
int
easycsv_print_rows(const easycsv *csv)
{
return csv->rows;
if (csv != NULL) {
return csv->rows;
}
else {
return -1;
}
}
int
easycsv_print_columns(const easycsv *csv)
{
return csv->cols;
if (csv != NULL) {
return csv->cols;
}
else {
return -1;
}
}
/*** Modifications, sort ***/

Loading…
Cancel
Save