瀏覽代碼

Fixed off-by-one error

tags/v0.9.3
Michael Brown 18 年之前
父節點
當前提交
6a18721ce8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/core/vsprintf.c

+ 1
- 1
src/core/vsprintf.c 查看文件

@@ -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…
取消
儲存