소스 검색

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…
취소
저장