diff --git a/src/ConsoleHelper.cpp b/src/ConsoleHelper.cpp index bd16e27..00b84de 100644 --- a/src/ConsoleHelper.cpp +++ b/src/ConsoleHelper.cpp @@ -149,7 +149,7 @@ namespace YYCC::ConsoleHelper { // anything else, use WriteFile instead. // WriteFile do not need extra convertion, because it is direct writing. // check whether string length is overflow - size_t strl_size = strl.size() * sizeof(std::string::value_type); + size_t strl_size = strl.size() * sizeof(yycc_u8string::value_type); // write string with size check if (strl_size <= std::numeric_limits::max()) { WriteFile(hStdOut, strl.c_str(), static_cast(strl_size), &dwWrittenNumberOfChars, NULL); diff --git a/src/DialogHelper.hpp b/src/DialogHelper.hpp index 6dbe54a..993dc79 100644 --- a/src/DialogHelper.hpp +++ b/src/DialogHelper.hpp @@ -58,7 +58,7 @@ namespace YYCC::DialogHelper { * @brief Add a filter pair in file types list. * @param filter_name[in] The friendly name of the filter. * @param il[in] A C++ initialize list. - * Every entries must be `const char*` represent a single filter pattern. + * Every entries must be `const yycc_char8_t*` represent a single filter pattern. * The list at least should have one valid pattern. * This function will not validate these filter patterns, so please write them carefully. * @return True if added success, otherwise false. diff --git a/src/ExceptionHelper.cpp b/src/ExceptionHelper.cpp index 388f093..f02a6d9 100644 --- a/src/ExceptionHelper.cpp +++ b/src/ExceptionHelper.cpp @@ -273,9 +273,9 @@ namespace YYCC::ExceptionHelper { // special proc for 2 exceptions if (rec->ExceptionCode == EXCEPTION_ACCESS_VIOLATION || rec->ExceptionCode == EXCEPTION_IN_PAGE_ERROR) { if (rec->NumberParameters >= 2) { - const char* op = - rec->ExceptionInformation[0] == 0 ? "read" : - rec->ExceptionInformation[0] == 1 ? "written" : "executed"; + const yycc_char8_t* op = + rec->ExceptionInformation[0] == 0 ? YYCC_U8("read") : + rec->ExceptionInformation[0] == 1 ? YYCC_U8("written") : YYCC_U8("executed"); UExceptionErrLogFormatLine(fs, YYCC_U8("The data at memory address 0x%" PRI_XPTR_LEFT_PADDING PRIxPTR " could not be %s."), rec->ExceptionInformation[1], op); }