mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-27 17:38:01 +03:00
Make Encoding::fromUtf8() and Encoding::toUtf8() return std::string
This commit is contained in:
@@ -348,9 +348,8 @@ CliFrontend::CommandResult CliFrontend::cmd_string() {
|
||||
if (no < 1 || no > MAX_STRVAR) {
|
||||
printf("Bad string index %s\n", arg);
|
||||
} else {
|
||||
char *utf = g_nact->encoding->toUtf8(g_nact->get_string(no - 1));
|
||||
printf("string[%d] = \"%s\"\n", no, utf); // TODO: escaping
|
||||
free(utf);
|
||||
std::string utf = g_nact->encoding->toUtf8(g_nact->get_string(no - 1));
|
||||
printf("string[%d] = \"%s\"\n", no, utf.c_str()); // TODO: escaping
|
||||
}
|
||||
arg = strtok(NULL, whitespaces);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user