diff --git a/include/gargoyle/codex.h b/include/gargoyle/codex.h index 972a2d0..38cc42d 100644 --- a/include/gargoyle/codex.h +++ b/include/gargoyle/codex.h @@ -7,12 +7,12 @@ static const uint8_t GARGOYLE_TYPE_BOOL = 1 << 0; static const uint8_t GARGOYLE_TYPE_UINT = 1 << 1; static const uint8_t GARGOYLE_TYPE_DBLE = 1 << 2; static const uint8_t GARGOYLE_TYPE_ROPE = 1 << 3; -static const uint8_t GARGOYLE_TYPE_FILE = 1 << 4; static const uint8_t GARGOYLE_ERR_SUCCESS = 0; static const uint8_t GARGOYLE_ERR_UNKNOWN_OPT = 1; static const uint8_t GARGOYLE_ERR_VALUE_REQUIRED = 2; static const uint8_t GARGOYLE_ERR_INVALID_UINT = 3; static const uint8_t GARGOYLE_ERR_INVALID_DBLE = 4; +static const uint8_t GARGOYLE_ERR_UNKNOWN_TYPE = 5; #endif diff --git a/src/scribe.c b/src/scribe.c index cb96972..53ae2b4 100644 --- a/src/scribe.c +++ b/src/scribe.c @@ -33,6 +33,8 @@ uint8_t gargoyle_from_rope(struct gargoyle_opt *opt, const char *brand) { char *val = opt->val; char *end = gargoyle_cpy(val, brand, opt->val_sz - 1); *end = '\0'; + } else { + return GARGOYLE_ERR_UNKNOWN_TYPE; } return 0;