Skip to content

Commit

Permalink
fix missing function 'strnlen_s'.
Browse files Browse the repository at this point in the history
  • Loading branch information
levalup committed Jun 24, 2024
1 parent c6c8548 commit f6a9506
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/uvcxx/cxx/buffer_like.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace uvcxx {

template<size_t Size>
buffer_like(const char (&arr)[Size])
: buf(init(arr, strnlen_s(arr, Size))) {}
: buf(init(arr, strnlen(arr, Size))) {}

#if __cplusplus >= 201703L || _MSC_VER >= 1910

Expand Down
2 changes: 1 addition & 1 deletion include/uvcxx/cxx/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace uvcxx {

template<int Size>
string_view(const char (&str)[Size])
: data(str), size(strnlen_s(str, Size)) {}
: data(str), size(strnlen(str, Size)) {}

#if __cplusplus >= 201703L || _MSC_VER >= 1910

Expand Down

0 comments on commit f6a9506

Please sign in to comment.