aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorjason <jkercher43@gmail.com>2025-04-13 12:05:39 -0400
committerjason <jkercher43@gmail.com>2025-04-13 12:05:39 -0400
commit4998d4ebd0e123fa468e4e153351589f83d7cca8 (patch)
tree27e397ad4eeecca10bb6e60ed7a71e91b97b7b1e /core
parentc10cf312ff47194d4fcfd8eaadf7130e6c3f7dd5 (diff)
Fix linux.dirent_name
Was not searching the first possible byte for 0.
Diffstat (limited to 'core')
-rw-r--r--core/sys/linux/wrappers.odin2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/sys/linux/wrappers.odin b/core/sys/linux/wrappers.odin
index ab1992a57..7b0dc61e2 100644
--- a/core/sys/linux/wrappers.odin
+++ b/core/sys/linux/wrappers.odin
@@ -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])
}