about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYour Name <you@example.com>2020-06-25 04:05:00 +0200
committerYour Name <you@example.com>2020-06-25 04:05:00 +0200
commit246bc94b176cd46a66437167eeaa40611d86da65 (patch)
tree6facc9f7badaba9aaaff11b82f1caee63e6b5184
parentShell: added support for command exit codes (diff)
downloadpOS-246bc94b176cd46a66437167eeaa40611d86da65.tar.gz
pOS-246bc94b176cd46a66437167eeaa40611d86da65.tar.bz2
pOS-246bc94b176cd46a66437167eeaa40611d86da65.zip
stdlib: fixed memset implementation bug
BUG: memset was just setting the first value of the buf
-rw-r--r--src/pOS/arch/x86/libc/string/memset.cpp2
1 files changed, 1 insertions, 1 deletions
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<uint8_t*>(buf);
 
     for(size_t i = 0; i < size; i++)
-        *bufptr = (uint8_t)value;
+        bufptr[i] = (uint8_t)value;
 
     return buf;
 }