From ee0bc579c1a1e7bade91dc34899b7412a6126556 Mon Sep 17 00:00:00 2001 From: fengxuesong Date: Mon, 4 Sep 2023 16:12:12 +0800 Subject: [PATCH] solve CI compilation error problem Signed-off-by: fengxuesong --- testing/fatutf8/fatutf8_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/fatutf8/fatutf8_main.c b/testing/fatutf8/fatutf8_main.c index cc42cae47..e2515bdd7 100644 --- a/testing/fatutf8/fatutf8_main.c +++ b/testing/fatutf8/fatutf8_main.c @@ -146,10 +146,10 @@ int main(int argc, FAR char *argv[]) printf("open successful\n"); len = read(fd, buf, sizeof(buf)); - buf[len] = '\0'; - if (len) + if (len >= 0) { + buf[len] = '\0'; printf("read(\"%s\") successful\n", buf); } else