summaryrefslogtreecommitdiff
path: root/libguile/init.c
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2014-10-10 22:36:54 -0400
committerMark H Weaver <mhw@netris.org>2014-10-10 23:31:55 -0400
commitb9ace68613395fda26f3f3d7dc2ac9bc52cd7f2a (patch)
tree1e43359da2374d86bed103cf67b5d7518b0862e7 /libguile/init.c
parent6b47249a28c7725714ee0e356d3d4b01dfc96aa2 (diff)
downloadguile-b9ace68613395fda26f3f3d7dc2ac9bc52cd7f2a.tar.gz
scm_boot_guile: Gracefully handle the case where argc == 0.
Fixes <http://bugs.gnu.org/18680>. Reported by Nala Ginrut <nalaginrut@gmail.com>. * libguile/init.c (scm_boot_guile): Do not canonicalize argv[0] unless argc > 0. * THANKS: Add Nala Ginrut to the fixes section.
Diffstat (limited to 'libguile/init.c')
-rw-r--r--libguile/init.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libguile/init.c b/libguile/init.c
index f55841337..1348c2d79 100644
--- a/libguile/init.c
+++ b/libguile/init.c
@@ -1,6 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- * 2004, 2006, 2009, 2010, 2011, 2012, 2013,
- * 2014 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2004, 2006, 2009-2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -314,7 +312,9 @@ scm_boot_guile (int argc, char ** argv, void (*main_func) (), void *closure)
/* On Windows, convert backslashes in argv[0] to forward
slashes. */
- scm_i_mirror_backslashes (argv[0]);
+ if (argc > 0)
+ scm_i_mirror_backslashes (argv[0]);
+
c.main_func = main_func;
c.closure = closure;
c.argc = argc;