Codechange: replace C-style string processing with C++-style for the listing callbacks

This commit is contained in:
Rubidium
2023-05-25 17:50:44 +02:00
committed by rubidium42
parent 433ec6b5bd
commit fbd71a9d72
5 changed files with 66 additions and 112 deletions

View File

@@ -269,7 +269,7 @@ void Squirrel::PrintFunc(HSQUIRRELVM vm, const std::string &s)
/* Check if we have a custom print function */
SQPrintFunc *func = ((Squirrel *)sq_getforeignptr(vm))->print_func;
if (func == nullptr) {
fmt::print("%s", s);
fmt::print("{}", s);
} else {
(*func)(false, s);
}