diff options
Diffstat (limited to 'c/main.cpp')
-rw-r--r-- | c/main.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -134,12 +134,9 @@ void OnTerminate() try { std::rethrow_exception(std::current_exception()); } catch (term_t &t) { - char *sz; TCHAR *tsz; - /* TODO: PL_get_wchars */ - if (PL_get_chars(t, &sz, CVT_WRITE) && (tsz = TszFromSz(sz, CP_UTF8))) { + if (PL_get_tchars(t, &tsz, CVT_WRITE)) { MessageBox(NULL, tsz, TEXT("Fatal Error"), MB_ICONERROR); - free(tsz); } else MessageBoxA(NULL, "The program was terminated due to a Prolog exception.", "Fatal Error", MB_ICONERROR); |