Fixed off-by-one error

pull/1/head
Michael Brown 2006-11-22 04:54:17 +00:00
parent fdaddd969a
commit 6a18721ce8
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ static void printf_sputc ( struct printf_context *ctx, unsigned int c ) {
struct sputc_context * sctx =
container_of ( ctx, struct sputc_context, ctx );
if ( ctx->len <= sctx->max_len )
if ( ctx->len < sctx->max_len )
sctx->buf[ctx->len] = c;
}