aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/WatchFrameDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-03-27 00:55:44 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-03-27 00:55:44 +1300
commitcf619556709df6d5481d2e4f712ddd6eeebab89d (patch)
tree29db1b3c291a4463ceb76685d86fbaecdcb11c07 /src/org/traccar/protocol/WatchFrameDecoder.java
parent094a9acabf8f0b94d1c62f77a409dbf7e3b137f6 (diff)
downloadtrackermap-server-cf619556709df6d5481d2e4f712ddd6eeebab89d.tar.gz
trackermap-server-cf619556709df6d5481d2e4f712ddd6eeebab89d.tar.bz2
trackermap-server-cf619556709df6d5481d2e4f712ddd6eeebab89d.zip
Improve Watch data decoding
Diffstat (limited to 'src/org/traccar/protocol/WatchFrameDecoder.java')
-rw-r--r--src/org/traccar/protocol/WatchFrameDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/WatchFrameDecoder.java b/src/org/traccar/protocol/WatchFrameDecoder.java
index f6b5ef12c..0009ef30f 100644
--- a/src/org/traccar/protocol/WatchFrameDecoder.java
+++ b/src/org/traccar/protocol/WatchFrameDecoder.java
@@ -45,7 +45,7 @@ public class WatchFrameDecoder extends FrameDecoder {
}
if (payloadIndex + 5 < buf.writerIndex() && buf.getByte(payloadIndex + 5) == '*'
- && buf.toString(payloadIndex + 1, 4, StandardCharsets.US_ASCII).matches("[0-9A-F]+")) {
+ && buf.toString(payloadIndex + 1, 4, StandardCharsets.US_ASCII).matches("\\p{XDigit}+")) {
lengthIndex = payloadIndex + 1;
payloadIndex = buf.indexOf(lengthIndex, buf.writerIndex(), (byte) '*');
if (payloadIndex < 0) {