diff --git a/regression/.gitignore b/regression/.gitignore deleted file mode 120000 index 65f1cfa74..000000000 --- a/regression/.gitignore +++ /dev/null @@ -1 +0,0 @@ -../stdlib/.gitignore \ No newline at end of file diff --git a/regression/.gitignore b/regression/.gitignore new file mode 100644 index 000000000..bf30d1b26 --- /dev/null +++ b/regression/.gitignore @@ -0,0 +1,5 @@ +*.html +*.sm +/*.log +*.i +*.s diff --git a/runtime/runtime.c b/runtime/runtime.c index a2f15d05f..6710bd94a 100644 --- a/runtime/runtime.c +++ b/runtime/runtime.c @@ -402,6 +402,7 @@ static StringBuf stringBuf; static void createStringBuf () { stringBuf.contents = (char*) malloc (STRINGBUF_INIT); + memset(stringBuf.contents, 0, STRINGBUF_INIT); stringBuf.ptr = 0; stringBuf.len = STRINGBUF_INIT; } diff --git a/stdlib/.gitignore b/stdlib/.gitignore index 0ec54007e..bf30d1b26 100644 --- a/stdlib/.gitignore +++ b/stdlib/.gitignore @@ -1,6 +1,5 @@ *.html *.sm -*.log +/*.log *.i *.s - diff --git a/stdlib/regression/.gitignore b/stdlib/regression/.gitignore new file mode 100644 index 000000000..50e13221d --- /dev/null +++ b/stdlib/regression/.gitignore @@ -0,0 +1 @@ +/*.log diff --git a/stdlib/regression/orig/test33.log b/stdlib/regression/orig/test33.log new file mode 100644 index 000000000..35beaeee9 --- /dev/null +++ b/stdlib/regression/orig/test33.log @@ -0,0 +1,2 @@ +{}.string: 0 +{}.stringcat: diff --git a/stdlib/regression/test33.lama b/stdlib/regression/test33.lama new file mode 100644 index 000000000..8bce46926 --- /dev/null +++ b/stdlib/regression/test33.lama @@ -0,0 +1,5 @@ +import List; +import Array; + +printf ("{}.string: %s\n", {}.string); +printf ("{}.stringcat: %s\n", {}.stringcat)