From e364deb72122bbf902294bd0f8b1dc77fb9e1b7a Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Tue, 9 Apr 2002 23:55:20 +0000 Subject: sprintf -> g_snprintf --- mixgtk/mixgtk_mixal.c | 5 +++-- mixgtk/mixgtk_mixvm.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mixgtk/mixgtk_mixal.c b/mixgtk/mixgtk_mixal.c index 7c7c402..42a11ce 100644 --- a/mixgtk/mixgtk_mixal.c +++ b/mixgtk/mixgtk_mixal.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mixgtk_mixal.c : * Implementation of the functions declared in mixgtk_mixal.h * ------------------------------------------------------------------ - * $Id: mixgtk_mixal.c,v 1.14 2002/04/09 23:28:19 jao Exp $ + * $Id: mixgtk_mixal.c,v 1.15 2002/04/09 23:55:20 jao Exp $ * ------------------------------------------------------------------ * Copyright (C) 2001, 2002 Free Software Foundation, Inc. * @@ -271,7 +271,8 @@ mixgtk_mixal_load_file (void) addr = mix_vm_get_lineno_address (vm_, k + 1); if (addr != MIX_VM_CELL_NO) { - sprintf (ADDR, "%04d: ", mix_short_magnitude (addr)); + g_snprintf (ADDR, ADDR_SIZE, "%04d: ", + mix_short_magnitude (addr)); mix_word_print_to_buffer (mix_vm_get_addr_contents (vm_, addr), ADDR + strlen (ADDR)); } diff --git a/mixgtk/mixgtk_mixvm.c b/mixgtk/mixgtk_mixvm.c index 351b58e..637ee31 100644 --- a/mixgtk/mixgtk_mixvm.c +++ b/mixgtk/mixgtk_mixvm.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mixgtk_mixvm.c : * Implementation of the functions declared in mixgtk_mixvm.h * ------------------------------------------------------------------ - * $Id: mixgtk_mixvm.c,v 1.8 2002/04/09 23:28:19 jao Exp $ + * $Id: mixgtk_mixvm.c,v 1.9 2002/04/09 23:55:20 jao Exp $ * ------------------------------------------------------------------ * Copyright (C) 2001, 2002 Free Software Foundation, Inc. * @@ -160,7 +160,7 @@ mixgtk_mixvm_init (mix_vm_t *vm, mixgtk_dialog_id_t top) for (k = 0; k< MIX_VM_CELL_NO; ++k) { gchar buffer[20]; - sprintf (buffer, "%04d", k); + g_snprintf (buffer, 20, "%04d", k); text[0] = buffer; gtk_clist_append (memory_, text); } -- cgit v1.2.3