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

Commit 1a867dcb authored by Andrei Homescu's avatar Andrei Homescu
Browse files

Fix build error from signed/unsigned comparison

Bug: 224644083
Test: m
Change-Id: I9adbe1ea53193d8c59f9022754cd3e23533e54ad
parent 4a40c57e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ status_t String8::appendFormatV(const char* fmt, va_list args)

    if (n > 0) {
        size_t oldLength = length();
        if (n > std::numeric_limits<size_t>::max() - 1 ||
        if (static_cast<size_t>(n) > std::numeric_limits<size_t>::max() - 1 ||
            oldLength > std::numeric_limits<size_t>::max() - n - 1) {
            return NO_MEMORY;
        }