Fixed memory issues with new Enum ToString handling.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-10 19:57:12 +02:00
parent 9244249a64
commit f89fb303b5
2 changed files with 4 additions and 2 deletions

View File

@@ -63,7 +63,7 @@
switch (value) { MACRO_UTILS_FOR_EACH(ENUM_CASE, name, values) } \
auto v = static_cast<int>(value); \
auto size = (int)((ceil(log10(v)) + 1) * sizeof(char)); \
char* snum = new char[size]; \
char* snum = new char[size + 1]; \
sprintf(snum, "%d", v); \
return snum; \
} \