diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/parse_module.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/tools/parse_module.c b/tools/parse_module.c index 7c54144..155fc9c 100644 --- a/tools/parse_module.c +++ b/tools/parse_module.c @@ -4,11 +4,21 @@ static inline int is_valid_valtype(char value_type) { - return - value_type == VALTYPE_I32 || - value_type == VALTYPE_I64 || - value_type == VALTYPE_F32 || - value_type == VALTYPE_F64; + if (value_type == VALTYPE_I32) + return 1; + + if (value_type == VALTYPE_I64 || + value_type == VALTYPE_F32 || + value_type == VALTYPE_F64) + PRERR("Only type i32 is recognized for now"); + + return -1; + + /* return */ + /* value_type == VALTYPE_I32 || */ + /* value_type == VALTYPE_I64 || */ + /* value_type == VALTYPE_F32 || */ + /* value_type == VALTYPE_F64; */ } static inline int is_valid_exportdesc(char desc) |