summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Millaway <john43@users.sourceforge.net>2003-03-19 22:58:40 +0000
committerJohn Millaway <john43@users.sourceforge.net>2003-03-19 22:58:40 +0000
commit265e2795729a5abcd115391223cb2f953992d7b8 (patch)
tree22cb7783e83a51ed3b8b528dbf2891149c5b4a07
parent80004429349b1b86a4f0567e9e82cf66719dff49 (diff)
Fixed allocation of slightly more memory than needed.
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index c2be713..8565e31 100644
--- a/main.c
+++ b/main.c
@@ -426,7 +426,7 @@ void check_options ()
for (i = 1; i <= lastsc; i++) {
char *str, *fmt = "#define %s %d\n";
- str = (char*)flex_alloc(strlen(fmt) + strlen(scname[i]) + (int)(1 + log(i)/log(2)) + 2);
+ str = (char*)flex_alloc(strlen(fmt) + strlen(scname[i]) + (int)(1 + log(i)/log(10)) + 2);
sprintf(str, fmt, scname[i], i - 1);
buf_strappend(&tmpbuf, str);
free(str);