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

Commit d79fe0de authored by Adam Stone's avatar Adam Stone Committed by Android (Google) Code Review
Browse files

Merge "Fix an incorrect CHECK in the code." into pi-dev

parents e83ac21b 630092e1
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);