diff options
| author | Tyge Løvset <[email protected]> | 2020-10-20 23:31:25 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2020-10-20 23:31:25 +0200 |
| commit | 1b05a8aa813c45bf3fb8a1232c0234b6fb8a2f47 (patch) | |
| tree | 608db096c969fc3c5ff8d960cc59e616c91eb455 | |
| parent | b70d9ca086c7a2a8dd3536a396d846a074ea9c02 (diff) | |
| download | STC-modified-1b05a8aa813c45bf3fb8a1232c0234b6fb8a2f47.tar.gz STC-modified-1b05a8aa813c45bf3fb8a1232c0234b6fb8a2f47.zip | |
Minor things.
| -rw-r--r-- | stc/cfmt.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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 {
|
