From 3a8cad91374739ec7143b94894f14435c1d09426 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Thu, 31 Oct 2013 13:47:30 +0100 Subject: [PATCH] metex14: Handle a few missing cases for overflow. --- hardware/common/dmm/metex14.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hardware/common/dmm/metex14.c b/hardware/common/dmm/metex14.c index 7f4b8905..8ba42913 100644 --- a/hardware/common/dmm/metex14.c +++ b/hardware/common/dmm/metex14.c @@ -61,6 +61,10 @@ static int parse_value(const uint8_t *buf, float *result) is_ol += (!strcasecmp((const char *)&valstr, "O.L")) ? 1 : 0; is_ol += (!strcasecmp((const char *)&valstr, "OL.")) ? 1 : 0; is_ol += (!strcasecmp((const char *)&valstr, "OL")) ? 1 : 0; + is_ol += (!strcasecmp((const char *)&valstr, "-.OL")) ? 1 : 0; + is_ol += (!strcasecmp((const char *)&valstr, "-O.L")) ? 1 : 0; + is_ol += (!strcasecmp((const char *)&valstr, "-OL.")) ? 1 : 0; + is_ol += (!strcasecmp((const char *)&valstr, "-OL")) ? 1 : 0; if (is_ol != 0) { sr_spew("Over limit."); *result = INFINITY;