# HG changeset patch # User William Astle # Date 1315267821 21600 # Node ID a88b04ba5ab81beb08c42470ab752a6c39bc1607 # Parent d59f17580e8b42be7774b538b07153241a3749dd Fixed segfault opening relative paths without a current directory on the stack; probably a symptom of another bug somewhere diff -r d59f17580e8b -r a88b04ba5ab8 lwasm/input.c --- a/lwasm/input.c Fri Sep 02 18:10:26 2011 -0600 +++ b/lwasm/input.c Mon Sep 05 18:10:21 2011 -0600 @@ -274,7 +274,7 @@ /* relative path, check relative to "current file" directory */ p = lw_stack_top(as -> file_dir); - p2 = make_filename(p, s); + p2 = make_filename(p ? p : "", s); debug_message(as, 2, "Open file (st cd) %s", p2); fp = fopen(p2, "rb"); if (fp)