diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-07-18 21:58:11 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-07-18 21:58:11 +0000 |
commit | ce0842a6ee214621ccf03693ab77a94851c09ab0 (patch) | |
tree | 1dd3965d94b6497335e9c7ca77c0e02a58003218 /src/gui_gtk.c | |
parent | bbebc857507f24c82cd5bb2f80305b74390b4611 (diff) | |
download | vim-git-ce0842a6ee214621ccf03693ab77a94851c09ab0.tar.gz |
updated for version 7.0109v7.0109
Diffstat (limited to 'src/gui_gtk.c')
-rw-r--r-- | src/gui_gtk.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui_gtk.c b/src/gui_gtk.c index 5bde7913c..cdd645b65 100644 --- a/src/gui_gtk.c +++ b/src/gui_gtk.c @@ -1476,8 +1476,7 @@ dlg_destroy(GtkWidget *dlg) const char *text; text = gtk_entry_get_text(GTK_ENTRY(dialog_textentry)); - STRNCPY(dialog_textfield, text, IOSIZE); - dialog_textfield[IOSIZE - 1] = NUL; + vim_strncpy(dialog_textfield, (char_u *)text, IOSIZE - 1); } /* Destroy the dialog, will break the waiting loop. */ @@ -2340,8 +2339,7 @@ gui_mch_dialog(int type, /* type of dialog */ text = (char_u *)gtk_entry_get_text(GTK_ENTRY(entry)); text = CONVERT_FROM_UTF8(text); - STRNCPY(textfield, text, IOSIZE); - textfield[IOSIZE - 1] = NUL; + vim_strncpy(textfield, text, IOSIZE - 1); CONVERT_FROM_UTF8_FREE(text); } |