Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
red-rj committed Oct 17, 2020
1 parent d494adb commit c4a5c0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10)
project(sessions VERSION 0.2.5)
project(sessions VERSION 0.2.6)

option(SESSIONS_TESTS "Build tests." On)

Expand Down
5 changes: 2 additions & 3 deletions src/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,23 +139,23 @@ namespace
auto length = narrow(wstr.data(), (int)wstr.size());
auto str = std::string(length, '\0');
auto result = narrow(wstr.data(), (int)wstr.size(), str.data(), length);
str.shrink_to_fit();

if (result == 0)
throw_win_error();

str.resize(result);
return str;
}

std::wstring to_wide(std::string_view nstr) {
auto length = wide(nstr.data(), (int)nstr.size());
auto str = std::wstring(length, L'\0');
auto result = wide(nstr.data(), (int)nstr.size(), str.data(), length);
str.shrink_to_fit();

if (result == 0)
throw_win_error();

str.resize(result);
return str;
}

Expand Down Expand Up @@ -335,7 +335,6 @@ namespace red::session

auto environment::size() const noexcept -> size_type
{
//return ranges::distance(*this); //BUG: SIGSEGV - Stack overflow on "remove env. variables"
return ranges::distance(begin(), end());
}

Expand Down

0 comments on commit c4a5c0e

Please sign in to comment.