]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/utf-8-conv.c
happy new year
[openldap] / libraries / libldap / utf-8-conv.c
index 14cd89e49452e49e9ee02a291c172dc87dae6215..d764bbad38ba7826034f31e2f5d4e7ff59945ec9 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -129,8 +129,8 @@ ldap_x_utf8s_to_wcs ( wchar_t *wcstr, const char *utf8str, size_t count )
        wchar_t ch;
 
 
-       /* If input ptr is NULL, treat it as empty string. */
-       if (utf8str == NULL) {
+       /* If input ptr is NULL or empty... */
+       if (utf8str == NULL || !*utf8str) {
                if ( wcstr )
                        *wcstr = 0;
                return 0;