* charsets.c (init_translation_table): Use g_snprintf() instead of sprintf().

This commit is contained in:
Andrew V. Samoilov 2002-10-07 07:14:09 +00:00
parent 886f98fafd
commit 001f9ec607

View File

@ -187,7 +187,8 @@ char* init_translation_table( int cpsource, int cpdisplay )
cd = iconv_open( cpdisp, cpsour );
if (cd == (iconv_t) -1) {
sprintf( errbuf, _("Cannot translate from %s to %s"), cpsour, cpdisp );
g_snprintf( errbuf, sizeof (errbuf),
_("Cannot translate from %s to %s"), cpsour, cpdisp );
return errbuf;
}
@ -200,7 +201,8 @@ char* init_translation_table( int cpsource, int cpdisplay )
cd = iconv_open( cpsour, cpdisp );
if (cd == (iconv_t) -1) {
sprintf( errbuf, _("Cannot translate from %s to %s"), cpdisp, cpsour );
g_snprintf( errbuf, sizeof (errbuf),
_("Cannot translate from %s to %s"), cpdisp, cpsour );
return errbuf;
}