diff options
author | Andy Wingo <wingo@pobox.com> | 2011-01-07 22:16:10 -0800 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-01-07 22:16:10 -0800 |
commit | a574564c24f5d08790f5a429c0f285938363a3f0 (patch) | |
tree | 903d20fe0db51d9b47481cb71be353f8914f584c /libguile/strings.c | |
parent | 2dd7d8ce7abcec373a9c7389f69456cb1f64a74e (diff) | |
download | guile-a574564c24f5d08790f5a429c0f285938363a3f0.tar.gz |
fix scm_from_stringn empty string case
* libguile/strings.c (scm_from_stringn): Fix empty string case
(oops...).
Diffstat (limited to 'libguile/strings.c')
-rw-r--r-- | libguile/strings.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/strings.c b/libguile/strings.c index 4760f336b..abe4a7b7c 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -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) { |