mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-13 23:03:16 +00:00
Merge pull request #5033 from jasonKercher/fix-dirent-name
Fix linux.dirent_name
This commit is contained in:
@@ -93,10 +93,10 @@ dirent_name :: proc "contextless" (dirent: ^Dirent) -> string #no_bounds_check {
|
||||
trunc := min(str_size, 8)
|
||||
str_size -= trunc
|
||||
for _ in 0..<trunc {
|
||||
str_size += 1
|
||||
if str[str_size] == 0 {
|
||||
break
|
||||
}
|
||||
str_size += 1
|
||||
}
|
||||
return string(str[:str_size])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user