diff --git a/include/usersystemlib_kernel.h b/include/usersystemlib_kernel.h index 28a1a61..3a33189 100644 --- a/include/usersystemlib_kernel.h +++ b/include/usersystemlib_kernel.h @@ -223,12 +223,12 @@ void *sceKernelMemcpy(void *dst, const void *src, SceSize size); * See http://www.cplusplus.com/reference/cstring/memset/ * * @param dst Pointer to the memory block to fill. - * @param val Value to be set, casted to the u8 type. + * @param val Value to be set. * @param size Number of bytes to be set. * * @return Value of dst. */ -void *sceKernelMemset(void *dst, s32 val, SceSize size); +void *sceKernelMemset(void *dst, s8 val, SceSize size); /** @} */ diff --git a/src/usersystemlib/mem.c b/src/usersystemlib/mem.c index a49bd41..74296ee 100644 --- a/src/usersystemlib/mem.c +++ b/src/usersystemlib/mem.c @@ -18,12 +18,12 @@ void *sceKernelMemcpy(void *dst, const void *src, SceSize size) } // FIXME: naive, not reversed! -void *sceKernelMemset(void *dst, s32 val, SceSize size) +void *sceKernelMemset(void *dst, s8 val, SceSize size) { u8 *dst8 = (u8*)dst; while (size--) { - *(dst8++) = (u8)val; + *(dst8++) = val; } return dst;