mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Properly check return value of std::fgets
This commit is contained in:
@@ -361,7 +361,9 @@ namespace hex::plugin::builtin {
|
||||
std::string input(128, '\x00');
|
||||
|
||||
log::print("> ");
|
||||
std::fgets(input.data(), input.size() - 1, stdin);
|
||||
if (std::fgets(input.data(), input.size() - 1, stdin) == nullptr)
|
||||
std::exit(EXIT_FAILURE);
|
||||
|
||||
input = wolv::util::trim(input);
|
||||
|
||||
if (input == ConfirmationString) {
|
||||
|
||||
Reference in New Issue
Block a user