py/misc: Fix truncating cast to char.

Explicitly specify the wanted cast otherwise this results in

    warning C4244: '=': conversion from 'unichar' to 'char',
    possible loss of data

when building with msvc with most warnings enabled.

Signed-off-by: stijn <stijn@ignitron.net>
This commit is contained in:
stijn
2026-02-05 14:27:29 +01:00
committed by Damien George
parent 39d777cb86
commit dc91fa6548

View File

@@ -243,7 +243,7 @@ static inline void vstr_ins_byte(vstr_t *vstr, size_t byte_pos, byte b) {
static inline void vstr_ins_char(vstr_t *vstr, size_t char_pos, unichar chr) {
// TODO UNICODE
char *s = vstr_ins_blank_bytes(vstr, char_pos, 1);
*s = chr;
*s = (char)chr;
}
static inline void vstr_ins_strn(vstr_t *vstr, size_t byte_pos, const char *str, size_t len) {
char *s = vstr_ins_blank_bytes(vstr, byte_pos, len);