summaryrefslogtreecommitdiff
path: root/same/src/main/java/com/orbekk
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-02-14 11:04:07 +0100
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-02-14 11:04:07 +0100
commit990f1cfeb54d7ef83a1ee465c95f53ce803c1b13 (patch)
tree0e0e15eeb9cf3e6ab868dcb374ae05970f04834f /same/src/main/java/com/orbekk
parent93bd1063a403fedfb79e334c5dcb81565afa655d (diff)
Don't print garbage from UDP packets.
Diffstat (limited to 'same/src/main/java/com/orbekk')
-rw-r--r--same/src/main/java/com/orbekk/net/BroadcastListener.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/same/src/main/java/com/orbekk/net/BroadcastListener.java b/same/src/main/java/com/orbekk/net/BroadcastListener.java
index 3fdfd23..50ad5af 100644
--- a/same/src/main/java/com/orbekk/net/BroadcastListener.java
+++ b/same/src/main/java/com/orbekk/net/BroadcastListener.java
@@ -46,7 +46,7 @@ public class BroadcastListener {
String address = packet.getAddress().getHostAddress();
logger.debug("Received broadcast from " + address +
- ": " + new String(packet.getData()));
+ ": " + new String(packet.getData(), 0, packet.getLength()));
return packet;
}