Review fixes

This commit is contained in:
Alexandre Paillier
2022-10-26 14:15:09 +02:00
parent 4af091f326
commit 174d35782f
5 changed files with 7 additions and 5 deletions

View File

@@ -64,7 +64,7 @@ static void ui_712_set_buf(const char *const src,
}
memcpy(dst, src, cpy_length);
dst[cpy_length] = '\0';
if (explicit_trunc && (src_length > dst_length)) {
if (explicit_trunc && (cpy_length < src_length)) {
memcpy(dst + cpy_length - 3, "...", 3);
}
}