diff options
-rw-r--r-- | test/cscodec-utf16.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/cscodec-utf16.c b/test/cscodec-utf16.c index 835c65e..f56516c 100644 --- a/test/cscodec-utf16.c +++ b/test/cscodec-utf16.c @@ -117,7 +117,7 @@ bool handle_line(const char *data, size_t datalen, void *pw) if (ctx->buf[ctx->bufused - 1] == '\n') ctx->bufused -= 1; - if (ctx->exp[ctx->expused - 1] == '\n') + if (ctx->expused != 0 && ctx->exp[ctx->expused - 1] == '\n') ctx->expused -= 1; run_test(ctx); |