mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
fix scm_from_stringn empty string case
* libguile/strings.c (scm_from_stringn): Fix empty string case (oops...).
This commit is contained in:
parent
2dd7d8ce7a
commit
a574564c24
1 changed files with 3 additions and 3 deletions
|
@ -1438,12 +1438,12 @@ scm_from_stringn (const char *str, size_t len, const char *encoding,
|
|||
SCM res;
|
||||
|
||||
/* The order of these checks is important. */
|
||||
if (len == 0)
|
||||
return scm_nullstr;
|
||||
if (!str)
|
||||
if (!str && len != 0)
|
||||
scm_misc_error ("scm_from_stringn", "NULL string pointer", SCM_EOL);
|
||||
if (len == (size_t) -1)
|
||||
len = strlen (str);
|
||||
if (len == 0)
|
||||
return scm_nullstr;
|
||||
|
||||
if (encoding == NULL)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue