summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/file/winptty.cpp
diff options
context:
space:
mode:
author Nathan Woods <npwoods@mess.org>2016-10-01 14:53:32 -0400
committer Nathan Woods <npwoods@mess.org>2016-10-01 14:53:32 -0400
commitc0ff37c30da931bd1ea203aba1e8dc8a05ea1bf1 (patch)
tree97265a831a19f4ef76e049886a5771033d25edcc /src/osd/modules/file/winptty.cpp
parent0e2299e424d7da177a57bb530ae740c79a3c92a0 (diff)
Adding new string conversion overloads
[a|w|t|utf8]_from_[a|w|t|utf8_]string(xyz.c_str()) seems to be common enough to justify overloads. Also, I'm explicitly assuming that it is legal to override the NUL pointer within a C++ basic_string (e.g. - s[s.size()] = '\0'). As far as I can tell, this seems to be legal - please don't shoot if I am wrong.
Diffstat (limited to 'src/osd/modules/file/winptty.cpp')
-rw-r--r--src/osd/modules/file/winptty.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osd/modules/file/winptty.cpp b/src/osd/modules/file/winptty.cpp
index 54aba00c253..b414c60c1f3 100644
--- a/src/osd/modules/file/winptty.cpp
+++ b/src/osd/modules/file/winptty.cpp
@@ -87,7 +87,7 @@ bool win_check_ptty_path(std::string const &path)
osd_file::error win_open_ptty(std::string const &path, std::uint32_t openflags, osd_file::ptr &file, std::uint64_t &filesize)
{
- auto t_name = tstring_from_utf8(path.c_str());
+ tstring t_name = tstring_from_utf8(path);
HANDLE pipe = CreateNamedPipe(t_name.c_str(), PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_NOWAIT, 1, 32, 32, 0, nullptr);