diff -r b8ac8a8e27c4 -r ebd94f2d6385 src/misc_gui.cpp --- a/src/misc_gui.cpp Tue May 27 20:33:44 2008 +0000 +++ b/src/misc_gui.cpp Tue May 27 21:41:00 2008 +0000 @@ -751,7 +751,7 @@ if (backspace) s = Utf8PrevChar(s); - size_t len = Utf8Decode(&c, s); + uint16 len = (uint16)Utf8Decode(&c, s); uint width = GetCharacterWidth(FS_NORMAL, c); tb->width -= width; @@ -807,7 +807,7 @@ bool InsertTextBufferChar(Textbuf *tb, WChar key) { const byte charwidth = GetCharacterWidth(FS_NORMAL, key); - size_t len = Utf8CharLen(key); + uint16 len = (uint16)Utf8CharLen(key); if (tb->length < (tb->maxlength - len) && (tb->maxwidth == 0 || tb->width + charwidth <= tb->maxwidth)) { memmove(tb->buf + tb->caretpos + len, tb->buf + tb->caretpos, tb->length - tb->caretpos + 1); Utf8Encode(tb->buf + tb->caretpos, key); @@ -847,7 +847,7 @@ if (tb->caretpos < tb->length) { WChar c; - tb->caretpos += Utf8Decode(&c, tb->buf + tb->caretpos); + tb->caretpos += (uint16)Utf8Decode(&c, tb->buf + tb->caretpos); tb->caretxoffs += GetCharacterWidth(FS_NORMAL, c); return true;