misc_gui.c
changeset 1419 6d94ac953371
parent 1397 b04402b901cd
child 1500 228f77e88adf
--- a/misc_gui.c	Thu Mar 03 23:26:35 2005 +0000
+++ b/misc_gui.c	Fri Mar 04 00:14:28 2005 +0000
@@ -765,7 +765,7 @@
 
 static void DelChar(Textbuf *tb)
 {
-	tb->width -= GetCharacterWidth(tb->buf[tb->caretpos]);
+	tb->width -= GetCharacterWidth((byte)tb->buf[tb->caretpos]);
 	memmove(tb->buf + tb->caretpos, tb->buf + tb->caretpos + 1, tb->length - tb->caretpos);
 	tb->length--;
 }
@@ -781,7 +781,7 @@
 {
 	if (delmode == WKC_BACKSPACE && tb->caretpos != 0) {
 		tb->caretpos--;
-		tb->caretxoffs -= GetCharacterWidth(tb->buf[tb->caretpos]);
+		tb->caretxoffs -= GetCharacterWidth((byte)tb->buf[tb->caretpos]);
 
 		DelChar(tb);
 		return true;
@@ -829,13 +829,13 @@
 	case WKC_LEFT:
 		if (tb->caretpos != 0) {
 			tb->caretpos--;
-			tb->caretxoffs -= GetCharacterWidth(tb->buf[tb->caretpos]);
+			tb->caretxoffs -= GetCharacterWidth((byte)tb->buf[tb->caretpos]);
 			return true;
 		}
 		break;
 	case WKC_RIGHT:
 		if (tb->caretpos < tb->length) {
-			tb->caretxoffs += GetCharacterWidth(tb->buf[tb->caretpos]);
+			tb->caretxoffs += GetCharacterWidth((byte)tb->buf[tb->caretpos]);
 			tb->caretpos++;
 			return true;
 		}