pry 2 years ago
parent
commit
0e4af67208
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      BPASmartClient.S7Net/EntityClassResolution.cs

+ 4
- 3
BPASmartClient.S7Net/EntityClassResolution.cs View File

@@ -219,14 +219,15 @@ namespace BPASmartClient.S7Net
break;
default:
{
//if (propertyType.IsClass) numBytes += 2;
object obj2 = Activator.CreateInstance(propertyType);
numBytes = FromBytes(obj2, bytes, numBytes);

numBytes = Math.Ceiling(numBytes);
if (numBytes / 2.0 - Math.Floor(numBytes / 2.0) > 0.0)
{
numBytes += 1.0;
}
object obj2 = Activator.CreateInstance(propertyType);
numBytes = FromBytes(obj2, bytes, numBytes);

obj = obj2;
break;
}


Loading…
Cancel
Save