- Removed `repack()` call in `setTestField(string)`

Command

- `getEncoded()` will now firstly call `repack()` (which updates the `data` array) and then returne said updated `data` array
This commit is contained in:
Tristan B. Velloza Kildaire 2023-10-08 17:03:59 +02:00
parent 593fccd38f
commit 1650775133
2 changed files with 4 additions and 3 deletions

View File

@ -56,6 +56,10 @@ public abstract class Command
*/
public final byte[] getEncoded()
{
// Force repack of the object
repack();
// Return the data
return data;
}

View File

@ -21,9 +21,6 @@ public final class NopMessage : Command
public void setTestField(string testField)
{
this.testField = testField;
// Ensure re-encoded
repack();
}
public override string toString()