Skip to content

Commit

Permalink
fixed Packet toString when there is no digi path
Browse files Browse the repository at this point in the history
  • Loading branch information
jdamico committed Nov 11, 2023
1 parent 7228c1c commit a847765
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/jdamico/javax25/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
*/
public class App
{
public static void main( String[] args )
{
public static void main( String[] args) {
Soundcard.enumerate();

Properties p = System.getProperties();
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/jdamico/javax25/ax25/Packet.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ public Packet(String destination,
int control,
int protocol,
byte[] payload) {

if(path == null) path = new String[] {};

int n = 7 + 7 + 7*path.length + 2 + payload.length;
byte[] bytes = new byte[n];

Expand Down

0 comments on commit a847765

Please sign in to comment.