Skip to content

Commit

Permalink
Resolve mridoni#179 - NULL indicator on fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiosa61 committed Apr 16, 2024
1 parent 69e2671 commit 5b242f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion runtime/libgixsql/gixsql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,9 @@ LIBGIXSQL_API int GIXSQLCursorFetchOne(struct sqlca_t* st, char* cname)
}

int sql_code_local = DBERR_NO_ERROR;
(*it)->createCobolData(buffer.get(), datalen, &sql_code_local);
char* _data_bfr = is_null ? nullptr : buffer.get();
uint64_t _data_len = is_null ? 0 : datalen;
(*it)->createCobolData(_data_bfr, _data_len, &sql_code_local);
if (sql_code_local) {
setStatus(st, dbi, sql_code_local);
sqlcode = sql_code_local;
Expand Down

0 comments on commit 5b242f2

Please sign in to comment.