Skip to content

Commit 074b07c

Browse files
committed
Fix save so it doesn't try to save to "/blank" when you pass that parameter.
1 parent 6e04a2a commit 074b07c

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Common.String.ixx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,17 @@ void TrimSpaces(_Inout_ std::u16string& text)
141141

142142
void UnquoteString(_Inout_ std::u16string& path)
143143
{
144+
if (path.empty())
145+
return;
146+
144147
if (path.back() == '\"')
145148
{
146149
path.pop_back();
147150
}
151+
152+
if (path.empty())
153+
return;
154+
148155
if (path.front() == '\"')
149156
{
150157
path.erase(0, 1);

MainWindow.ixx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ int APIENTRY wWinMain(
116116
else if (_wcsicmp(ToWChar(trimmedCommandLine.c_str()), L"/blank") == 0)
117117
{
118118
wantBlankCanvas = true;
119+
trimmedCommandLine.clear();
119120
}
120121
else if (trimmedCommandLine[0] == '/')
121122
{

0 commit comments

Comments
 (0)