mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
output_buffer wasn't set correctly when the buffer was allocated
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14993 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stdio_vfprintf.c,v 1.18 2005-05-29 08:19:36 obarthel Exp $
|
||||
* $Id: stdio_vfprintf.c,v 1.19 2005-06-26 11:57:26 tfrieden Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -30,7 +30,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _STDLIB_NULL_POINTER_CHECK_H
|
||||
#include "stdlib_null_pointer_check.h"
|
||||
#endif /* _STDLIB_NULL_POINTER_CHECK_H */
|
||||
@ -927,6 +926,7 @@ vfprintf(FILE * stream,const char * format, va_list arg)
|
||||
|
||||
buffer_start = internal_buffer;
|
||||
buffer_stop = &internal_buffer[internal_buffer_size - 1];
|
||||
output_buffer = buffer_start;
|
||||
}
|
||||
|
||||
if(v >= 1.0)
|
||||
@ -1528,6 +1528,7 @@ vfprintf(FILE * stream,const char * format, va_list arg)
|
||||
|
||||
if(prefix != NULL)
|
||||
{
|
||||
|
||||
for(i = 0 ; prefix[i] != '\0' ; i++)
|
||||
{
|
||||
/* One less character to fill the output with. */
|
||||
@ -1615,7 +1616,7 @@ vfprintf(FILE * stream,const char * format, va_list arg)
|
||||
minimum_field_width -= num_trailing_zeroes + trail_string_len;
|
||||
}
|
||||
#endif /* FLOATING_POINT_SUPPORT */
|
||||
|
||||
|
||||
for(i = output_len ; i < minimum_field_width ; i++)
|
||||
{
|
||||
if(__putc(fill_character,stream,buffer_mode) == EOF)
|
||||
@ -1636,6 +1637,7 @@ vfprintf(FILE * stream,const char * format, va_list arg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for(i = 0 ; i < output_len ; i++)
|
||||
{
|
||||
if(__putc(output_buffer[i],stream,buffer_mode) == EOF)
|
||||
|
||||
Reference in New Issue
Block a user