diff options
author | John Millaway <john43@users.sourceforge.net> | 2003-03-19 22:58:40 +0000 |
---|---|---|
committer | John Millaway <john43@users.sourceforge.net> | 2003-03-19 22:58:40 +0000 |
commit | 265e2795729a5abcd115391223cb2f953992d7b8 (patch) | |
tree | 22cb7783e83a51ed3b8b528dbf2891149c5b4a07 | |
parent | 80004429349b1b86a4f0567e9e82cf66719dff49 (diff) |
Fixed allocation of slightly more memory than needed.
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |