Skip to content
Snippets Groups Projects
Commit f69577ad authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

fix range check in olm_*_last_errror

parent e21d5cb2
No related branches found
No related tags found
No related merge requests found
......@@ -190,7 +190,7 @@ const char * olm_account_last_error(
OlmAccount * account
) {
unsigned error = unsigned(from_c(account)->last_error);
if (error < sizeof(ERRORS)) {
if (error < (sizeof(ERRORS)/sizeof(ERRORS[0]))) {
return ERRORS[error];
} else {
return "UNKNOWN_ERROR";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment