修正了种子编译器的错误
This commit is contained in:
@@ -38,10 +38,11 @@ def strncpy(dest: str, src: str, n: t.CSizeT) -> str:
|
||||
dest[0] = s
|
||||
dest += 1
|
||||
i += 1
|
||||
# 填充剩余空间为 '\0'
|
||||
for i in range(n):
|
||||
# 填充剩余空间为 '\0'(只填充 n-i 个,避免缓冲区溢出)
|
||||
while i < n:
|
||||
dest[0] = 0
|
||||
dest += 1
|
||||
i += 1
|
||||
return original_dest
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user