On Thu, 10 Jan 2002, Joshua Nye wrote:
> 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.
>
> --- 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);
> + }
> }
Thanks for spotting this one. I think it makes more sense to have
the test in resources.c:free_string itself, then other functions cannot
possibly make the same mistake themselves. I've made the needed changes.
Alex Gough