]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_addch.c
ncurses 5.9 - patch 20111022
[ncurses.git] / ncurses / base / lib_addch.c
index 515ebaf0b8fc551a269af9ed7b7cda0ff85cb32e..dd6f800e6b6f9fff70c79e228f9fd6b998e4d39f 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -36,7 +36,7 @@
 #include <curses.priv.h>
 #include <ctype.h>
 
 #include <curses.priv.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_addch.c,v 1.124 2010/04/24 22:41:05 tom Exp $")
+MODULE_ID("$Id: lib_addch.c,v 1.125 2011/10/22 16:51:31 tom Exp $")
 
 static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
 
 
 static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
 
@@ -209,7 +209,8 @@ _nc_build_wch(WINDOW *win, ARG_CH_T ch)
     buffer[WINDOW_EXT(win, addch_used)] = '\0';
     if ((len = (int) mbrtowc(&result,
                             buffer,
     buffer[WINDOW_EXT(win, addch_used)] = '\0';
     if ((len = (int) mbrtowc(&result,
                             buffer,
-                            WINDOW_EXT(win, addch_used), &state)) > 0) {
+                            (size_t) WINDOW_EXT(win, addch_used),
+                            &state)) > 0) {
        attr_t attrs = AttrOf(CHDEREF(ch));
        if_EXT_COLORS(int pair = GetPair(CHDEREF(ch)));
        SetChar(CHDEREF(ch), result, attrs);
        attr_t attrs = AttrOf(CHDEREF(ch));
        if_EXT_COLORS(int pair = GetPair(CHDEREF(ch)));
        SetChar(CHDEREF(ch), result, attrs);