diff --git a/lib_nbgl/src/nbgl_fonts.c b/lib_nbgl/src/nbgl_fonts.c index 06eb80d16..006b0ef8b 100644 --- a/lib_nbgl/src/nbgl_fonts.c +++ b/lib_nbgl/src/nbgl_fonts.c @@ -608,6 +608,10 @@ bool nbgl_getTextMaxLenInNbLines(nbgl_font_id_e fontId, // if \n, reset width if (unicode == '\n') { maxNbLines--; + // if last line is reached, let's rewind before carriage return + if (maxNbLines == 0) { + text--; + } width = 0; continue; } diff --git a/lib_nbgl/src/nbgl_use_case.c b/lib_nbgl/src/nbgl_use_case.c index 9859b30d1..a0b908b2e 100644 --- a/lib_nbgl/src/nbgl_use_case.c +++ b/lib_nbgl/src/nbgl_use_case.c @@ -1051,7 +1051,7 @@ static const char *getDetailsPageAt(uint8_t detailsPage) AVAILABLE_WIDTH, NB_MAX_LINES_IN_DETAILS, &len, - false); + detailsContext.wrapping); len -= 3; currentChar = currentChar + len; }