ref: 6e3ecea216b6fee1ec2f1e51c8984152f2d25c83
parent: e3ffcaec25ef58d15a4964e4e8b9fe2e2fd32616
author: Ali Gholami Rudi <ali@rudi.ir>
date: Tue Mar 26 12:33:54 EDT 2013
reg: allow reimplementing built-in macros
--- a/reg.c
+++ b/reg.c
@@ -53,7 +53,8 @@
if (sregs[id])
free(sregs[id]);
sregs[id] = malloc(len);
- strcpy(sregs[id], s);
+ memcpy(sregs[id], s, len);
+ sregs_dat[id] = NULL;
}
char *str_get(int id)