common: error out if hlq parsing encounters bool type prior to HLQ1

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
1 files changed, 5 insertions(+), 1 deletions(-)

M common/qso-pack.c
M common/qso-pack.c +5 -1
@@ 740,7 740,11 @@ struct val *hlq_parse_kv(struct buffer *
 			val = parse_int(tvspace + 1, *eol);
 			break;
 		case HT_BOOL:
-			val = parse_bool(tvspace + 1, eol);
+			/* bool type was introduced in version 1 */
+			if (ver >= 1)
+				val = parse_bool(tvspace + 1, eol);
+			else
+				val = ERR_PTR(-EILSEQ);
 			break;
 		case HT_TIME:
 		case HT_STR_OL: