summaryrefslogtreecommitdiffstats
path: root/src/osd/modules/debugger/win/debugviewinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/debugger/win/debugviewinfo.cpp')
-rw-r--r--src/osd/modules/debugger/win/debugviewinfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osd/modules/debugger/win/debugviewinfo.cpp b/src/osd/modules/debugger/win/debugviewinfo.cpp
index d6e94c1ba3e..6965d032dfa 100644
--- a/src/osd/modules/debugger/win/debugviewinfo.cpp
+++ b/src/osd/modules/debugger/win/debugviewinfo.cpp
@@ -320,8 +320,8 @@ void debugview_info::handle_context_menu(unsigned command)
for (uint32_t col = 0; col < visarea.x; ++col)
text += wchar_t(viewdata[col].byte);
std::wstring::size_type const nonblank = text.find_last_not_of(L"\t\n\v\r ");
- if ((nonblank != std::wstring::npos) && (nonblank >= start))
- text.resize(nonblank + 1);
+ if (nonblank != std::wstring::npos)
+ text.resize((std::max)(start, nonblank + 1));
text += L"\r\n";
}