From c27f8baa3162c47b0badd5fc223c4cfe7f5ab941 Mon Sep 17 00:00:00 2001 From: "Justin C. Miller" Date: Sun, 18 Feb 2024 17:29:43 -0800 Subject: [PATCH] [libj6] Fix the infinite loop in simple_strlen The simple_strlen function was incrementing n but not advancing the pointer. --- src/libraries/j6/protocols/vfs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/j6/protocols/vfs.cpp b/src/libraries/j6/protocols/vfs.cpp index b34bd0f..6b17ec3 100644 --- a/src/libraries/j6/protocols/vfs.cpp +++ b/src/libraries/j6/protocols/vfs.cpp @@ -12,7 +12,7 @@ client::client(j6_handle_t vfs_mb) : { } -inline size_t simple_strlen(const char *s) { size_t n = 0; while (s && *s) n++; return n; } +inline size_t simple_strlen(const char *s) { size_t n = 0; while (s && *s) s++, n++; return n; } j6_status_t client::load_file(char *path, j6_handle_t &vma)