Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 630092e1 authored by Adam Stone's avatar Adam Stone
Browse files

Fix an incorrect CHECK in the code.

This is a trivial fix for an incorrect check.

Bug: 77262269
Test: Re-ran unit tests and GTS tests. Verified Google Play.
Change-Id: I807d8488f65c60c03779064cb92bbbd6c60267e4
parent 3e69b248
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -68,10 +68,12 @@ constexpr char kEqualsSign[] = "=";

template<typename T>
std::string toBase64StringNoPad(const T* data, size_t size) {
    if (size == 0) {
    // Note that the base 64 conversion only works with arrays of single-byte
    // values. If the source is empty or is not an array of single-byte values,
    // return empty string.
    if (size == 0 || sizeof(data[0]) != 1) {
      return "";
    }
    CHECK(sizeof(data[0] == 1));

    android::AString outputString;
    encodeBase64(data, size, &outputString);