Fixed a bug when creating a column and checking the comments string if
it was NULL
This commit is contained in:
2
src/obidmscolumn.c
Executable file → Normal file
2
src/obidmscolumn.c
Executable file → Normal file
@ -1149,7 +1149,7 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
|||||||
strncpy(header->name, column_name, OBIDMS_COLUMN_MAX_NAME);
|
strncpy(header->name, column_name, OBIDMS_COLUMN_MAX_NAME);
|
||||||
|
|
||||||
// Comments must be a json string, even empty
|
// 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, "{}");
|
comments_ok = obi_column_write_comments(new_column, "{}");
|
||||||
else
|
else
|
||||||
comments_ok = obi_column_write_comments(new_column, comments);
|
comments_ok = obi_column_write_comments(new_column, comments);
|
||||||
|
Reference in New Issue
Block a user