diff --git a/Compiler/runtime/systemimpl.c b/Compiler/runtime/systemimpl.c index b6161aba110..ba6df140086 100644 --- a/Compiler/runtime/systemimpl.c +++ b/Compiler/runtime/systemimpl.c @@ -275,7 +275,7 @@ RML_BEGIN_LABEL(System__toupper) { char *base = RML_STRINGDATA(rmlA0); long len = strlen(base); - char *res = (char*) malloc(len); + char *res = (char*) malloc(len+1); int i; for (i=0; i