[libc] Fix memset off-by-half error

The first bug caught by test_runner! Due to a single-character typo,
memset was only ever setting about half of the buffer it was given.
This commit is contained in:
Justin C. Miller
2022-02-12 21:36:51 -08:00
parent 4e5a796e50
commit 6dea9a4b63

View File

@@ -20,7 +20,7 @@
namespace __j6libc { namespace __j6libc {
constexpr size_t log2(size_t n) { constexpr size_t log2(size_t n) {
return n < 2 ? 1 : 1 + log2(n/2); return n < 2 ? 0 : 1 + log2(n/2);
} }
constexpr size_t word_bytes = sizeof(void*); constexpr size_t word_bytes = sizeof(void*);