From d7c88780e1df54f34563d60bd7fa01011d2eef03 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期一, 26 一月 2026 23:17:17 +0800
Subject: [PATCH] 1.CSVData.cpp 里 unserialize 用了 8*2、125*2,但 serialize 只写 8 + 125 字节。 m_svRawData.insert 的 end 指针是 pszBuffer + 125*2,没有用 index 计算,可能把无效区域一起拷进去。 一旦 size 实际是 133(不是 266),就会直接越界,堆会被破坏,m_svDatas.clear() 在销毁元素时崩。

---
 SourceCode/Bond/SGMeasurement/SGMeasurementDlg.h |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/SGMeasurement/SGMeasurementDlg.h b/SourceCode/Bond/SGMeasurement/SGMeasurementDlg.h
index 53293f7..a1d8aae 100644
--- a/SourceCode/Bond/SGMeasurement/SGMeasurementDlg.h
+++ b/SourceCode/Bond/SGMeasurement/SGMeasurementDlg.h
@@ -3,6 +3,10 @@
 //
 
 #pragma once
+
+#include "PLCSignalListener.h"
+#include "ProductResultStorage.h"
+
 #include <map>
 #include <vector>
 #include <numeric>
@@ -330,4 +334,18 @@
 	 * @brief 鏍囪绋嬪簭鏄惁閫氳繃鎵樼洏鍥炬爣閫�鍑�
 	 */
 	BOOL m_bExitingFromTray;
+
+	// === PLC 淇″彿鐩戝惉鍣� ===
+
+	/**
+	 * @brief PLC 淇″彿鐩戝惉鍣ㄥ疄渚嬶紝鐢ㄤ簬澶勭悊 PLC 淇″彿浜嬩欢
+	 */
+	CPLCSignalListener m_plcListener;
+
+	// === 浜у搧缁撴灉瀛樺偍 ===
+
+	/**
+	 * @brief 浜у搧缁撴灉瀛樺偍瀹炰緥锛岀敤浜庝繚瀛樺拰绠$悊娴嬮噺缁撴灉
+	 */
+	CProductResultStorage m_resultStorage;
 };

--
Gitblit v1.9.3