summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-10-20 23:31:25 +0200
committerTyge Løvset <[email protected]>2020-10-20 23:31:25 +0200
commit1b05a8aa813c45bf3fb8a1232c0234b6fb8a2f47 (patch)
tree608db096c969fc3c5ff8d960cc59e616c91eb455
parentb70d9ca086c7a2a8dd3536a396d846a074ea9c02 (diff)
downloadSTC-modified-1b05a8aa813c45bf3fb8a1232c0234b6fb8a2f47.tar.gz
STC-modified-1b05a8aa813c45bf3fb8a1232c0234b6fb8a2f47.zip
Minor things.
-rw-r--r--stc/cfmt.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/stc/cfmt.h b/stc/cfmt.h
index d0d86026..2e82ca6a 100644
--- a/stc/cfmt.h
+++ b/stc/cfmt.h
@@ -115,11 +115,10 @@ _cfmt_printf(int s, const char* fmt, ...) {
#if !defined(STC_HEADER) || defined(STC_IMPLEMENTATION)
#include <stdarg.h>
-#include <string.h>
STC_DEF char *
_cfmt_conv(const char *fmt, ...) {
- char *fmt2 = strcpy((char *) malloc(strlen(fmt) * 2), fmt), *p = fmt2, *f, ch;
+ char *fmt2 = strcpy((char *) malloc(strlen(fmt)*2 + 1), fmt), *p = fmt2, *f, ch;
va_list args;
va_start(args, fmt);
do {