From a817d18b5556406ddd03a06d05d4de7a0cbeb95d Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 15 Jul 2018 23:29:24 +0800 Subject: [PATCH] =?UTF-8?q?Copy=E7=9A=84=E6=96=B9=E5=90=91=E5=8F=8D?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCADA/Program/DataService/CacheReader.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SCADA/Program/DataService/CacheReader.cs b/SCADA/Program/DataService/CacheReader.cs index 84e8834..a639466 100644 --- a/SCADA/Program/DataService/CacheReader.cs +++ b/SCADA/Program/DataService/CacheReader.cs @@ -140,7 +140,7 @@ namespace DataService { byte[] b = Encoding.ASCII.GetBytes(str); int index = address.CacheIndex; - Array.Copy(_cache, index, b, 0, b.Length); + Array.Copy(b, 0, _cache, index, b.Length); return 0; } @@ -302,7 +302,7 @@ namespace DataService { byte[] b = Encoding.ASCII.GetBytes(str); int index = address.CacheIndex; - Array.Copy(_cache, index, b, 0, b.Length); + Array.Copy(b, 0, _cache, index, b.Length); return 0; } @@ -496,7 +496,7 @@ namespace DataService { byte[] b = Encoding.ASCII.GetBytes(str); int index = address.CacheIndex; - Buffer.BlockCopy(_cache, index, b, 0, b.Length); + Buffer.BlockCopy(b, 0, _cache, index, b.Length); return 0; } @@ -695,7 +695,7 @@ namespace DataService { byte[] b = Encoding.ASCII.GetBytes(str); int index = address.CacheIndex; - Buffer.BlockCopy(_cache, index, b, 0, b.Length); + Buffer.BlockCopy(b, 0, _cache, index, b.Length); return 0; } @@ -864,7 +864,7 @@ namespace DataService { byte[] b = Encoding.ASCII.GetBytes(str); int index = address.CacheIndex; - Buffer.BlockCopy(_cache, index, b, 0, b.Length); + Buffer.BlockCopy(b, 0, _cache, index, b.Length); return 0; } @@ -1030,7 +1030,7 @@ namespace DataService { byte[] b = Encoding.ASCII.GetBytes(str); int index = address.CacheIndex; - Buffer.BlockCopy(_cache, index, b, 0, b.Length); + Buffer.BlockCopy(b, 0, _cache, index, b.Length); return 0; }