Fix a bug in the new VALID() method, false is not true
This commit is contained in:
@@ -74,6 +74,7 @@ char *akerr_name_for_status(int status, char *name);
|
||||
void akerr_init();
|
||||
void akerr_default_handler_unhandled_error(akerr_ErrorContext *ptr);
|
||||
void akerr_default_logger(const char *f, ...);
|
||||
int akerr_valid_error_address(akerr_ErrorContext *ptr);
|
||||
/* defined in src/errno.c which is built dynamically at build time from system errno definitions */
|
||||
void akerr_init_errno(void);
|
||||
|
||||
@@ -178,7 +179,7 @@ void akerr_init_errno(void);
|
||||
|
||||
#define VALID(__err_context, __stmt) \
|
||||
__stmt; \
|
||||
if ( akerr_valid_error_address(__err_context) == 0 ) { \
|
||||
if ( akerr_valid_error_address(__err_context) == 1 ) { \
|
||||
FAIL(__err_context, AKERR_BEHAVIOR, "Received (akerr_Error *) from an invalid memory region. (Did the method finish without calling SUCCEED_RETURN?)"); \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user