Fix linux.dirent_name

Was not searching the first possible byte for 0.
This commit is contained in:
jason
2025-04-13 12:05:39 -04:00
parent c10cf312ff
commit 4998d4ebd0
+1 -1
View File
@@ -93,10 +93,10 @@ dirent_name :: proc "contextless" (dirent: ^Dirent) -> string #no_bounds_check {
trunc := min(str_size, 8) trunc := min(str_size, 8)
str_size -= trunc str_size -= trunc
for _ in 0..<trunc { for _ in 0..<trunc {
str_size += 1
if str[str_size] == 0 { if str[str_size] == 0 {
break break
} }
str_size += 1
} }
return string(str[:str_size]) return string(str[:str_size])
} }