Browse Source

Fixed off-by-one error

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
6a18721ce8
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/core/vsprintf.c

+ 1
- 1
src/core/vsprintf.c View File

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

Loading…
Cancel
Save