]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - lib/vsprintf.c
[PATCH] Export soc_common_drv_pcmcia_remove to allow modular PCMCIA.
[linux-2.6-omap-h63xx.git] / lib / vsprintf.c
index 797428afd1114f3dc1ad3c239917b9f04ceccd55..bed7229378f2da073be0c25eda0a30bf07146380 100644 (file)
@@ -489,7 +489,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
                if (str < end)
                        *str = '\0';
                else
-                       *end = '\0';
+                       end[-1] = '\0';
        }
        /* the trailing null byte doesn't count towards the total */
        return str-buf;