Skip to content

Commit

Permalink
Merge pull request #353 from libplctag/#337
Browse files Browse the repository at this point in the history
Fix logic error when getting DebugLevel
  • Loading branch information
timyhac authored Oct 29, 2023
2 parents 9b94f1e + 8e5436a commit 57f8678
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/libplctag/NativeTagWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,7 @@ public DebugLevel DebugLevel
{
ThrowIfAlreadyDisposed();

if (_isInitialized)
return _debugLevel;
else
return GetDebugLevel();
return _debugLevel;
}
set
{
Expand Down Expand Up @@ -536,11 +533,6 @@ private void SetDebugLevel(DebugLevel level)
_native.plc_tag_set_debug_level((int)level);
}

private DebugLevel GetDebugLevel()
{
return (DebugLevel)GetIntAttribute("debug");
}

public bool GetBit(int offset)
{
ThrowIfAlreadyDisposed();
Expand Down

0 comments on commit 57f8678

Please sign in to comment.