X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=form%2Ffrm_driver.c;h=dfb6699ebdf3bb68e54cef11d1026d69acd27078;hp=d550953737083fcd44b9eae145dede9ee6f4e3a9;hb=3faafb2efcc426a48649c12943d5006cae12cff1;hpb=5242fccf157e715ed878455a3efea6c82b840eb5 diff --git a/form/frm_driver.c b/form/frm_driver.c index d5509537..dfb6699e 100644 --- a/form/frm_driver.c +++ b/form/frm_driver.c @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_driver.c,v 1.78 2007/02/04 00:28:38 tom Exp $") +MODULE_ID("$Id: frm_driver.c,v 1.79 2007/03/12 21:49:00 tom Exp $") /*---------------------------------------------------------------------------- This is the core module of the form library. It contains the majority @@ -4274,7 +4274,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value) wclear(field->working); mvwaddstr(field->working, 0, 0, value); - if ((widevalue = (FIELD_CELL *)calloc(len, sizeof(FIELD_CELL))) == 0) + if ((widevalue = (FIELD_CELL *)calloc(len + 1, sizeof(FIELD_CELL))) == 0) { RETURN(E_SYSTEM_ERROR); }