mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-14 00:34:41 +00:00
misc. string fixes
convert remaining %s to %hs or %ls use WPRINTF_ARGS on unicode printf functions fix: __func__ can't be widened via preprocessor (-> revert to char*) convert remaining external_[directory|file_string to string() Util: don't mix fwprintf and fprintf Formation: fix dangling pointer (storing result of c_str()) This was SVN commit r7164.
This commit is contained in:
@@ -409,16 +409,16 @@ void ScriptingHost::ErrorReporter(JSContext* UNUSED(cx), const char* pmessage, J
|
||||
// apparently there is no further information in this struct we can use
|
||||
// because linebuf/tokenptr require a buffer to have been allocated.
|
||||
// that doesn't look possible since we are a callback and there is
|
||||
// no mention in the dox about where this would happen (typical).
|
||||
// no mention in the docs about where this would happen (typical).
|
||||
|
||||
// for developer convenience: write to output window so they can
|
||||
// doubleclick on that line and be taken to the error locus.
|
||||
// double-click on that line and be taken to the error locus.
|
||||
debug_printf(L"%ls(%d): %ls\n", file.c_str(), line, message.c_str());
|
||||
|
||||
// note: CLogger's LOG already takes care of writing to the console,
|
||||
// so don't do that here.
|
||||
|
||||
LOG(CLogger::Error, LOG_CATEGORY, L"JavaScript Error (%s, line %d): %s", file.c_str(), line, message.c_str());
|
||||
LOG(CLogger::Error, LOG_CATEGORY, L"JavaScript Error (%ls, line %d): %ls", file.c_str(), line, message.c_str());
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
||||
Reference in New Issue
Block a user