summaryrefslogtreecommitdiffstats
path: root/charsets
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-09-20 12:03:31 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-09-20 12:03:31 +0000
commitd4bc4e3d0ce48671c64b71e71cab878d339e0b34 (patch)
tree0417edabd25ba5ede414e6a03cc92183bbe53ab7 /charsets
parent451e37f237b4e98b3450d922a8f59e107cf81911 (diff)
parse_i18n.c doesn't really need snprintf.
Diffstat (limited to 'charsets')
-rw-r--r--charsets/parse_i18n.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/charsets/parse_i18n.c b/charsets/parse_i18n.c
index 02eaba79..e4c148dc 100644
--- a/charsets/parse_i18n.c
+++ b/charsets/parse_i18n.c
@@ -21,6 +21,8 @@
#include <string.h>
#include <ctype.h>
+#define _GEN_CHARSETS
+
#include "../charset.h"
#if 0
@@ -339,10 +341,11 @@ int main(int argc, const char *argv[])
fclose(fp);
- if(m && m->charset && m->is_valid)
+ if(m && m->charset && m->is_valid
+ && (basedir ? 0 : strlen(basedir) + 1)
+ + strlen(m->charset) + 1 < sizeof(buffer))
{
- snprintf(buffer, sizeof(buffer), "%s%s%s",
- basedir ? basedir : "", basedir ? "/" : "",
+ sprintf(buffer, "%s%s%s", basedir ? basedir : "", basedir ? "/" : "",
m->charset);
if((fp = fopen(buffer, "w")))