Commit ec3b3699 authored by Marius Harjoi's avatar Marius Harjoi

Error mask should be added with or

parent aeb710d8
......@@ -101,7 +101,7 @@ namespace AMWD.Modbus.Tcp.Protocol
var fn = (byte)Function;
if (IsError)
fn = (byte)(fn & Consts.ErrorMask);
fn = (byte)(fn | Consts.ErrorMask);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment