Fixed a bug when creating a column and checking the comments string if

it was NULL
This commit is contained in:
Celine Mercier
2019-03-07 15:09:59 +01:00
parent 720bb65b24
commit 1ee50b7222

2
src/obidmscolumn.c Executable file → Normal file
View File

@ -1149,7 +1149,7 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
strncpy(header->name, column_name, OBIDMS_COLUMN_MAX_NAME);
// Comments must be a json string, even empty
if ((strcmp(comments, "") == 0) || (comments == NULL))
if ((comments == NULL) || (strcmp(comments, "") == 0))
comments_ok = obi_column_write_comments(new_column, "{}");
else
comments_ok = obi_column_write_comments(new_column, comments);