Commit 182f33f8 authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

Complete fixes for olm_*_last_error

Should have been in the previous commit :/
parent f69577ad
......@@ -202,7 +202,7 @@ const char * olm_session_last_error(
OlmSession * session
) {
unsigned error = unsigned(from_c(session)->last_error);
if (error < sizeof(ERRORS)) {
if (error < (sizeof(ERRORS)/sizeof(ERRORS[0]))) {
return ERRORS[error];
} else {
return "UNKNOWN_ERROR";
......@@ -213,7 +213,7 @@ const char * olm_utility_last_error(
OlmUtility * utility
) {
unsigned error = unsigned(from_c(utility)->last_error);
if (error < sizeof(ERRORS)) {
if (error < (sizeof(ERRORS)/sizeof(ERRORS[0]))) {
return ERRORS[error];
} else {
return "UNKNOWN_ERROR";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment