mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 20:06:49 +01:00
Fix incorrect encoding used in _error_handler functions
Co-authored-by: Haoyu Qiu <timothyqiu32@gmail.com>
This commit is contained in:
parent
45f12bc8be
commit
5b66d10760
@ -59,9 +59,9 @@ void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_f
|
|||||||
|
|
||||||
String err_str;
|
String err_str;
|
||||||
if (p_errorexp && p_errorexp[0]) {
|
if (p_errorexp && p_errorexp[0]) {
|
||||||
err_str = p_errorexp;
|
err_str = String::utf8(p_errorexp);
|
||||||
} else {
|
} else {
|
||||||
err_str = String(p_file) + ":" + itos(p_line) + " - " + String(p_error);
|
err_str = String::utf8(p_file) + ":" + itos(p_line) + " - " + String::utf8(p_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_type == ERR_HANDLER_WARNING) {
|
if (p_type == ERR_HANDLER_WARNING) {
|
||||||
|
@ -487,7 +487,7 @@ String RenameDialog::_substitute(const String &subject, const Node *node, int co
|
|||||||
|
|
||||||
void RenameDialog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type) {
|
void RenameDialog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type) {
|
||||||
RenameDialog *self = (RenameDialog *)p_self;
|
RenameDialog *self = (RenameDialog *)p_self;
|
||||||
String source_file(p_file);
|
String source_file = String::utf8(p_file);
|
||||||
|
|
||||||
// Only show first error that is related to "regex"
|
// Only show first error that is related to "regex"
|
||||||
if (self->has_errors || source_file.find("regex") < 0) {
|
if (self->has_errors || source_file.find("regex") < 0) {
|
||||||
@ -496,9 +496,9 @@ void RenameDialog::_error_handler(void *p_self, const char *p_func, const char *
|
|||||||
|
|
||||||
String err_str;
|
String err_str;
|
||||||
if (p_errorexp && p_errorexp[0]) {
|
if (p_errorexp && p_errorexp[0]) {
|
||||||
err_str = p_errorexp;
|
err_str = String::utf8(p_errorexp);
|
||||||
} else {
|
} else {
|
||||||
err_str = p_error;
|
err_str = String::utf8(p_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
self->has_errors = true;
|
self->has_errors = true;
|
||||||
|
@ -486,7 +486,7 @@ void ScriptDebuggerRemote::_err_handler(void *ud, const char *p_func, const char
|
|||||||
}
|
}
|
||||||
|
|
||||||
ScriptDebuggerRemote *sdr = (ScriptDebuggerRemote *)ud;
|
ScriptDebuggerRemote *sdr = (ScriptDebuggerRemote *)ud;
|
||||||
sdr->send_error(p_func, p_file, p_line, p_err, p_descr, p_type, si);
|
sdr->send_error(String::utf8(p_func), String::utf8(p_file), p_line, String::utf8(p_err), String::utf8(p_descr), p_type, si);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScriptDebuggerRemote::_parse_live_edit(const Array &p_command) {
|
bool ScriptDebuggerRemote::_parse_live_edit(const Array &p_command) {
|
||||||
|
Loading…
Reference in New Issue
Block a user