@@ -146,12 +146,21 @@ VAL MKFLOAT(VM* vm, double val) {
148VAL MKSTR(VM* vm, char* str) {
148VAL MKSTR(VM* vm, char* str) {
153+ len = strlen(str)+1;
149 Closure* cl = allocate(vm, sizeof(Closure) + // Type) + sizeof(char*) +
155 Closure* cl = allocate(vm, sizeof(Closure) + // Type) + sizeof(char*) +
150− sizeof(char)*strlen(str)+1, 0);
156+ sizeof(char)*len, 0);
151 SETTY(cl, STRING);
157 SETTY(cl, STRING);
152 cl -> info.str = (char*)cl + sizeof(Closure);
158 cl -> info.str = (char*)cl + sizeof(Closure);
153−
159+ if (str == NULL) {
160+ cl->info.str = NULL;
154− strcpy(cl -> info.str, str);
162+ strcpy(cl -> info.str, str);
155 return cl;
164 return cl;