1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-02 19:39:12 +00:00

(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.

This commit is contained in:
rubidium
2007-01-10 18:56:51 +00:00
parent a332d10fd9
commit f35ed4bbc2
190 changed files with 2825 additions and 2208 deletions

View File

@@ -6,6 +6,7 @@
#include "string.h"
#include "macros.h"
#include "table/control_codes.h"
#include "helpers.hpp"
#include <stdarg.h>
#include <ctype.h> // required for tolower()
@@ -63,7 +64,7 @@ char* CDECL str_fmt(const char* str, ...)
va_start(va, str);
len = vsnprintf(buf, lengthof(buf), str, va);
va_end(va);
p = malloc(len + 1);
MallocT(&p, len + 1);
if (p != NULL) memcpy(p, buf, len + 1);
return p;
}