Hello,
I'm not sure if this behavior was intended or not, but just in case I'm submitting
this patch.
The read op would segfault if you gave a string register as the first argument that
didn't previously have a string value in it.
--- will_fail.pasm ---
read S0, 0, 1
end
----------------------
--- wont_fail.pasm ---
set S0, ""
read S0, 0, 1
end
----------------------
This patch might be futile since work is probably still being done on string support.
=/
--Josh
--- string.c.orig Thu Jan 10 11:26:39 2002
+++ string.c Thu Jan 10 11:27:12 2002
@@ -71,7 +71,9 @@
*/
void
string_destroy(STRING *s) {
- free_string(s);
+ if(s) {
+ free_string(s);
+ }
}
/* Ordinary user-visible string operations */