diff options
| author | Your Name <[email protected]> | 2020-06-25 04:05:00 +0200 |
|---|---|---|
| committer | Your Name <[email protected]> | 2020-06-25 04:05:00 +0200 |
| commit | 246bc94b176cd46a66437167eeaa40611d86da65 (patch) | |
| tree | 6facc9f7badaba9aaaff11b82f1caee63e6b5184 /src | |
| parent | Shell: added support for command exit codes (diff) | |
| download | pOS-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
Diffstat (limited to 'src')
| -rw-r--r-- | src/pOS/arch/x86/libc/string/memset.cpp | 2 |
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; } |