Skip to content

Commit b5445a7

Browse files
authored
Merge pull request #272 from viest/dev
Fix: null in cell callback
2 parents fd60b0a + d20e1a1 commit b5445a7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

kernel/read.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,11 @@ int sheet_row_callback (size_t row, size_t max_col, void* callback_data)
302302
/* {{{ */
303303
int sheet_cell_callback (size_t row, size_t col, const char *value, void *callback_data)
304304
{
305-
size_t _value_length = strlen(value);
305+
size_t _value_length = 0;
306+
307+
if (value != NULL) {
308+
_value_length = strlen(value);
309+
}
306310

307311
if (callback_data == NULL) {
308312
return FAILURE;

0 commit comments

Comments
 (0)