aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/olm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/olm.cpp b/src/olm.cpp
index 63f3d83..15c5e83 100644
--- a/src/olm.cpp
+++ b/src/olm.cpp
@@ -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";