From 246bc94b176cd46a66437167eeaa40611d86da65 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 25 Jun 2020 04:05:00 +0200 Subject: stdlib: fixed memset implementation bug BUG: memset was just setting the first value of the buf --- src/pOS/arch/x86/libc/string/memset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pOS/arch/x86/libc/string/memset.cpp b/src/pOS/arch/x86/libc/string/memset.cpp index 35ab14a..7183295 100644 --- a/src/pOS/arch/x86/libc/string/memset.cpp +++ b/src/pOS/arch/x86/libc/string/memset.cpp @@ -5,7 +5,7 @@ void* memset(void* buf, int value, size_t size) uint8_t* bufptr = static_cast(buf); for(size_t i = 0; i < size; i++) - *bufptr = (uint8_t)value; + bufptr[i] = (uint8_t)value; return buf; } -- cgit 1.4.1