Skip to content

Commit

Permalink
Fix yasio_ni
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Jun 18, 2024
1 parent 0f587b7 commit 52b1f20
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions NativeLibs/yasio/yasio/bindings/yasio_ni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,12 @@ YASIO_NI_API void yasio_set_option(void* service_ptr, int opt, const char* pszAr
std::array<cxx17::string_view, YASIO_MAX_OPTION_ARGC> args;
int argc = 0;
yasio::split_if(&strArgs.front(), ';', [&](char* s, char* e) {
*e = '\0'; // to c style string
args[argc++] = cxx17::string_view(s, e - s);
if (e) {
*e = '\0'; // to c style string
args[argc++] = cxx17::string_view(s, e - s);
} else {
args[argc++] = cxx17::string_view{s};
}
return (argc < YASIO_MAX_OPTION_ARGC);
});

Expand Down

0 comments on commit 52b1f20

Please sign in to comment.