X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/9421e4b0be3a6a59e93ad092e3904b3ff8092e84..14fbadc58e3d6f6faa45d1d90fe1340f177ef045:/projects/stargazer/plugins/other/rscript/rscript.cpp?ds=sidebyside diff --git a/projects/stargazer/plugins/other/rscript/rscript.cpp b/projects/stargazer/plugins/other/rscript/rscript.cpp index 17b86c67..7a0605a2 100644 --- a/projects/stargazer/plugins/other/rscript/rscript.cpp +++ b/projects/stargazer/plugins/other/rscript/rscript.cpp @@ -430,12 +430,15 @@ for(it = rsSettings.GetUserParams().begin(); ++it) { std::string parameter; - if (*it == "tariffName") + if (*it == "tariffName") parameter = rsu.user->GetParamValue("tariff"); - else + else parameter = rsu.user->GetParamValue(*it); if (params.length() + parameter.length() > RS_PARAMS_LEN - 1) + { + logger("Script params string length %d exceeds the limit of %d symbols.", params.length() + parameter.length(), RS_PARAMS_LEN); break; + } params += parameter + " "; } strncpy((char *)packetTail.params, params.c_str(), RS_PARAMS_LEN);