diff --git a/src/strings.cpp b/src/strings.cpp --- a/src/strings.cpp +++ b/src/strings.cpp @@ -926,8 +926,9 @@ static char *FormatString(char *buff, co sub_args.SetParam(i++, param); } else { + s++; // skip the leading \" char *g = stredup(s); - g[p - s] = '\0'; + g[p - s - 1] = '\0'; // skip the trailing \" sub_args_need_free[i] = true; sub_args.SetParam(i++, (uint64)(size_t)g); @@ -1044,7 +1045,6 @@ static char *FormatString(char *buff, co break; case SCC_RAW_STRING_POINTER: { // {RAW_STRING} - if (game_script) break; const char *raw_string = (const char *)(size_t)args->GetInt64(SCC_RAW_STRING_POINTER); buff = FormatString(buff, raw_string, args, last); break;