Fix support for other simple types and floating point
Again a silly mistake in sign-extension of (char)0xff to -1.
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
diff --git a/src/cborparser.c b/src/cborparser.c
index 6825698..a3883ba 100644
--- a/src/cborparser.c
+++ b/src/cborparser.c
@@ -169,7 +169,9 @@
switch (descriptor) {
case FalseValue:
it->extra = false;
- // fall through
+ type = CborBooleanType;
+ break;
+
case TrueValue:
case NullValue:
case UndefinedValue:
@@ -180,11 +182,12 @@
break;
case SimpleTypeInNextByte:
- it->extra = it->ptr[1];
#ifndef CBOR_PARSER_NO_STRICT_CHECKS
- if (it->extra < 32)
+ if ((unsigned char)it->ptr[1] < 32)
return CborErrorIllegalSimpleType;
#endif
+ break;
+
case 28:
case 29:
case 30: