aboutsummaryrefslogtreecommitdiff
path: root/libs/kstd/src
diff options
context:
space:
mode:
authorLukas Oesch <lukasoesch20@gmail.com>2026-03-03 13:57:33 +0100
committerLukas Oesch <lukasoesch20@gmail.com>2026-03-17 16:42:41 +0100
commitfe0aadec94834b72f4511ce5e300b9fb22e66e60 (patch)
treeaba7920857fad95a755d052af6e8c5c5b21b808d /libs/kstd/src
parent1883c8bbcbd2aeff57ce8f2dac1289f68418bbc7 (diff)
downloadteachos-fe0aadec94834b72f4511ce5e300b9fb22e66e60.tar.xz
teachos-fe0aadec94834b72f4511ce5e300b9fb22e66e60.zip
small refactoring
Diffstat (limited to 'libs/kstd/src')
-rw-r--r--libs/kstd/src/libc/string.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/kstd/src/libc/string.cpp b/libs/kstd/src/libc/string.cpp
index 302046d..63f012c 100644
--- a/libs/kstd/src/libc/string.cpp
+++ b/libs/kstd/src/libc/string.cpp
@@ -22,13 +22,14 @@ namespace kstd::libc
return dest;
}
- auto memset(void * dest, std::byte value, std::size_t size) -> void *
+ auto memset(void * dest, int value, std::size_t size) -> void *
{
+ auto const byte_value = static_cast<std::byte>(static_cast<unsigned char>(value));
auto dest_span = std::span{static_cast<std::byte *>(dest), size};
for (std::size_t i = 0; i < size; ++i)
{
- dest_span[i] = value;
+ dest_span[i] = byte_value;
}
return dest;