]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/rscript/rscript.cpp
Change %i to %d
[stg.git] / projects / stargazer / plugins / other / rscript / rscript.cpp
index 4a9e8d32920108ce0dd325e2946effc7c9cedd36..7a0605a2309d157891d7ed922182771566d70f4a 100644 (file)
@@ -430,12 +430,15 @@ for(it = rsSettings.GetUserParams().begin();
     ++it)
     {
     std::string parameter;
     ++it)
     {
     std::string parameter;
-    if (it->c_str() == "tariffName") 
+    if (*it == "tariffName")
         parameter = rsu.user->GetParamValue("tariff");
         parameter = rsu.user->GetParamValue("tariff");
-    else 
-        parameter = rsu.user->GetParamValue(it->c_str());
+    else
+        parameter = rsu.user->GetParamValue(*it);
     if (params.length() + parameter.length() > RS_PARAMS_LEN - 1)
     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;
         break;
+    }
     params += parameter + " ";
     }
 strncpy((char *)packetTail.params, params.c_str(), RS_PARAMS_LEN);
     params += parameter + " ";
     }
 strncpy((char *)packetTail.params, params.c_str(), RS_PARAMS_LEN);