Fixed error with uninitialized variable.
authorPeter Verthez <Peter.Verthez@advalvas.be>
Sun, 29 Dec 2002 13:04:25 +0000 (13:04 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Sun, 29 Dec 2002 13:04:25 +0000 (13:04 +0000)
utf8/utf8-convert.c

index d573ad79b6f252f0e69915ca70b77a2143172faf..264cb9aa015a9cfe54bfa7c0f8aa1e4abda2b03c 100644 (file)
@@ -209,7 +209,7 @@ char* convert_from_utf8(convert_t conv, const char* input, int* conv_fails,
   struct conv_buffer* outbuf;
 
   if (!conv || !conv->outbuf || !input) {
-    if (conv_fails != NULL) *conv_fails = insize;
+    if (conv_fails != NULL) *conv_fails = (input ? strlen(input) : 0);
     return NULL;
   }
   insize = strlen(input);