aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/WondexProtocolDecoder.java2
-rw-r--r--test/org/traccar/protocol/WondexProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/WondexProtocolDecoder.java b/src/org/traccar/protocol/WondexProtocolDecoder.java
index 5e3f3f390..964ecf5ff 100644
--- a/src/org/traccar/protocol/WondexProtocolDecoder.java
+++ b/src/org/traccar/protocol/WondexProtocolDecoder.java
@@ -36,7 +36,7 @@ public class WondexProtocolDecoder extends BaseProtocolDecoder {
* Regular expressions pattern
*/
static private Pattern pattern = Pattern.compile(
- ".*" + // Header
+ "[^\\d]*" + // Header
"(\\d+)," + // Device Identifier
"(\\d{4})(\\d{2})(\\d{2})" + // Date (YYYYMMDD)
"(\\d{2})(\\d{2})(\\d{2})," + // Time (HHMMSS)
diff --git a/test/org/traccar/protocol/WondexProtocolDecoderTest.java b/test/org/traccar/protocol/WondexProtocolDecoderTest.java
index e8e52c149..249c8f2ef 100644
--- a/test/org/traccar/protocol/WondexProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/WondexProtocolDecoderTest.java
@@ -10,6 +10,9 @@ public class WondexProtocolDecoderTest {
WondexProtocolDecoder decoder = new WondexProtocolDecoder(null);
decoder.setDataManager(new TestDataManager());
+
+ assertNotNull(decoder.decode(null, null,
+ "1044989601,20130323074605,0.000000,90.000000,0,000,0,0,2"));
assertNotNull(decoder.decode(null, null,
"210000001,20070313170040,121.123456,12.654321,0,233,0,9,2,0.0,0,0.00,0.00,0"));