From 523f3bac59944dc9eb65106f2a6849699f9fc11c Mon Sep 17 00:00:00 2001 From: Stepland <10530295-Buggyroom@users.noreply.gitlab.com> Date: Sun, 3 Apr 2022 16:55:04 +0200 Subject: [PATCH] more fixes to nowide --- tests/nowide.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/nowide.cpp b/tests/nowide.cpp index 0b17ecd..928048a 100644 --- a/tests/nowide.cpp +++ b/tests/nowide.cpp @@ -6,7 +6,7 @@ #include #include -int main(int argc, char** argv) { +int main() { const char* _filepath = tinyfd_openFileDialog( "Open File", nullptr, 0, nullptr, nullptr, false ); @@ -16,7 +16,7 @@ int main(int argc, char** argv) { auto filepath = std::filesystem::path{_filepath}; nowide::ifstream f(filepath.string().c_str()); // argv[1] - is UTF-8 if(not f) { - nowide::cerr << "Can't open " << argv[1] << std::endl; + nowide::cerr << "Can't open " << filepath << std::endl; return 1; } std::size_t total_lines = 0;