diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-24 02:05:30 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-24 02:05:30 +0200 |
commit | 98f28569b631d36a6f129a17ea7589b48884c1eb (patch) | |
tree | 45fdc18108edaf45fa424324591ab7a7aaa1db10 /c/main.cpp | |
parent | 3a133c4063cbb81bee9f5bc55427be75d8e584e0 (diff) | |
download | EpisodeBrowser-98f28569b631d36a6f129a17ea7589b48884c1eb.tar.gz |
Fix PL_get_tchars.
See c6cd2f1.
Diffstat (limited to 'c/main.cpp')
-rw-r--r-- | c/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -64,9 +64,9 @@ void OnTerminate() noexcept try { std::rethrow_exception(std::current_exception()); } catch (const term_t& t) { - TCHAR* tsz; - if (PL_get_tchars(t, &tsz, CVT_WRITE)) - TerminateMsg<TCHAR>(TEXT("a Prolog exception"), tsz); + std::basic_string<TCHAR> tstr; + if (PlString(t, &tstr)) + TerminateMsg<TCHAR>(TEXT("a Prolog exception"), tstr.c_str()); else TerminateMsg<char>("a Prolog exception", NULL); } catch (const Win32Error& e) { |