1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

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.
This commit is contained in:
Mark H Weaver 2014-10-10 22:36:54 -04:00
parent 6b47249a28
commit b9ace68613
2 changed files with 5 additions and 4 deletions

1
THANKS
View file

@ -86,6 +86,7 @@ For fixes or providing information which led to a fix:
Andrew Gaylard Andrew Gaylard
Nils Gey Nils Gey
Eric Gillespie, Jr Eric Gillespie, Jr
Nala Ginrut
Didier Godefroy Didier Godefroy
Panicz Maciej Godek Panicz Maciej Godek
John Goerzen John Goerzen

View file

@ -1,6 +1,4 @@
/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, /* Copyright (C) 1995-2004, 2006, 2009-2014 Free Software Foundation, Inc.
* 2004, 2006, 2009, 2010, 2011, 2012, 2013,
* 2014 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * 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 /* On Windows, convert backslashes in argv[0] to forward
slashes. */ slashes. */
scm_i_mirror_backslashes (argv[0]); if (argc > 0)
scm_i_mirror_backslashes (argv[0]);
c.main_func = main_func; c.main_func = main_func;
c.closure = closure; c.closure = closure;
c.argc = argc; c.argc = argc;