X-Git-Url: http://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/2ec44cef64979d8e19eb66206c26a7bcad4bef8a..c123302699919b0f34de9bc5d9019c2c1f14b7a1:/src/error.c diff --git a/src/error.c b/src/error.c index e46c28f..8071547 100644 --- a/src/error.c +++ b/src/error.c @@ -50,9 +50,9 @@ int lbx_error_new(const char *str) const char **new; size_t size; - if (user_error_max >= MIN(SIZE_MAX, INT_MAX)/2 - LBX_EUBASE) + if (user_error_max >= MIN((size_t)-1, INT_MAX)/2 - LBX_EUBASE) return -1; - if (2 * user_error_max >= SIZE_MAX / sizeof *user_errors) + if (2 * user_error_max >= (size_t)-1 / sizeof *user_errors) return -1; size = 2 * user_error_max * sizeof *user_errors;