mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[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:
@@ -20,7 +20,7 @@
|
||||
namespace __j6libc {
|
||||
|
||||
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*);
|
||||
|
||||
Reference in New Issue
Block a user