Browse Source

修改bug

shishenghui 4 days ago
parent
commit
4f1d48c520

+ 2 - 2
TIN001-PLC/Jet_Furance_PMC/Jet_Furance_PMC/Jet_Furance_PMC/FurancePMC/SC.cpp

@@ -85,13 +85,13 @@ const int CSC::parseScData(const char* scData)
                         scName[index - 6] = ptrName[index];
                         index++;
                     }
-                    scName[index] = 0x00;
+                    scName[index-6] = 0x00;
                     index = 7;
                     while (ptrValue[index] != 0x00 && ptrValue[index] != '"') {
                         scValue[index - 7] = ptrValue[index];
                         index++;
                     }
-                    scValue[index] = 0x00;
+                    scValue[index-7] = 0x00;
                     if (strcmp_ignoreAa(scValue, "true") == 0) {
                         boolConfig.set(scName, TRUE);
                         count++;