Commit 9fd215b0 authored by Johny Mattsson's avatar Johny Mattsson
Browse files

Corrected sprintf() prototype & behaviour.

parent 74d27b34
......@@ -1094,12 +1094,14 @@ exponent(char *p, int exp, int fmtch)
#endif /* FLOATINGPT */
void c_sprintf(char *s, char *fmt, ...)
int c_sprintf(char *s, const char *fmt, ...)
{
int n;
va_list arg;
va_start(arg, fmt);
vsprintf(s, fmt, arg);
n = vsprintf(s, fmt, arg);
va_end(arg);
return n;
}
#endif
......@@ -60,7 +60,7 @@ extern void output_redirect(const char *str);
#define c_sprintf os_sprintf
#else
#include "c_stdarg.h"
void c_sprintf(char* s,char *fmt, ...);
int c_sprintf(char* s,const char *fmt, ...);
#endif
// #define c_vsprintf ets_vsprintf
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment