Commit 3e73f3c585919a946bdf136f64c9ad1ae9945e56
Fix PromptRequest::prompt() never returning error
`std::wstring()` calls "got response" constructor of PromptResult()
during implicit conversion.
Author: xaizek
Author date (UTC): 2020-09-20 12:10
Committer name: xaizek
Committer date (UTC): 2020-09-20 12:11
Parent(s): 194ab84b1f4185a7451f33146bfff2a812457013
Signing key: 99DC5E4DB05F6BE2
Tree: c3b0c64c93a55a4e9134b8ba9165c1825048d82c
File PromptRequest.cpp changed (mode: 100644) (index e4e7fd5..ecb1380) |
... |
... |
PromptRequest::prompt(const std::wstring &invitation, |
171 |
171 |
add_history(line.get()); |
add_history(line.get()); |
172 |
172 |
} |
} |
173 |
173 |
|
|
174 |
|
return (cancelled ? std::wstring() : cursed::toWide(line.get())); |
|
|
174 |
|
return (cancelled ? PromptResult() : cursed::toWide(line.get())); |
175 |
175 |
} |
} |
176 |
176 |
|
|
177 |
177 |
void |
void |