1 files changed, 5 insertions, 1 deletions
diff --git a/string.c b/string.c index a557dc5..d066c18 100644 --- a/ string.c+++ b/ string.c@@ -4,7 +4,11 @@ void* memset(void *dst, int c, uint n) { - stosb(dst, c, n); + if ((int)dst%4 == 0 && n%4 == 0){ + c &= 0xFF; + stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4); + } else + stosb(dst, c, n); return dst; } |