]> granicus.if.org Git - php/commitdiff
Adjust vsnprintf() usage
authorIlia Alshanetsky <iliaa@php.net>
Wed, 28 Feb 2007 01:01:01 +0000 (01:01 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 28 Feb 2007 01:01:01 +0000 (01:01 +0000)
ext/mbstring/oniguruma/regerror.c

index 134cf25c6b6dc4ccb349cb3ba7496fdad24fd308..0ef63be091fa356d50bb42e1711c008b5737e59f 100644 (file)
@@ -1,4 +1,4 @@
-/**********************************************************************
+
   regerror.c -  Oniguruma (regular expression library)
 **********************************************************************/
 /*-
@@ -279,7 +279,7 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist)
   va_init_list(args, fmt);
   n = vsnprintf((char* )buf, bufsize, (const char* )fmt, args);
   if (n >= bufsize) {
-       return;
+       n = bufsize - 1;
   }
   va_end(args);