fix garbage buffers

master
Daniel Kolesa 2016-08-31 21:50:43 +01:00
parent 5ee9668bfc
commit ae2a65749b
1 changed files with 2 additions and 2 deletions

View File

@ -7,13 +7,13 @@ namespace cscript {
CsString intstr(CsInt v) {
char buf[256];
snprintf(buf, sizeof(buf), IntFormat, v);
return buf;
return static_cast<char const *>(buf);
}
CsString floatstr(CsFloat v) {
char buf[256];
snprintf(buf, sizeof(buf), v == CsInt(v) ? RoundFloatFormat : FloatFormat, v);
return buf;
return static_cast<char const *>(buf);
}
char *cs_dup_ostr(ostd::ConstCharRange s) {