Add missing cast in RTF paste data construction.

udata[uindex] is a wchar_t, so if we pass it to sprintf("%d") we
should cast it to int (because who knows what primitive integer type
that might have corresponded to otherwise). I had done this in the
first of the two sprintfs that use it, but missed the second one a few
lines further on. Spotted by Coverity.
This commit is contained in:
Simon Tatham 2020-06-16 17:43:55 +01:00
Родитель 44adc8be1b
Коммит 4ea56076a8
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -5255,7 +5255,7 @@ static void wintw_clip_write(
(int)udata[uindex]);
alen = 1; strcpy(after, "}");
} else {
blen = sprintf(before, "\\u%d", udata[uindex]);
blen = sprintf(before, "\\u%d", (int)udata[uindex]);
alen = 0; after[0] = '\0';
}
}