sv: fix sv_substr

Issue I came up with when looking at the code, based on
sv_chop_right's impl.  Why do we keep this function around again?
This commit is contained in:
2026-02-10 16:43:13 +00:00
committed by oreodave
parent 818d4da850
commit b646ae3f7e

View File

@@ -38,7 +38,7 @@ sv_t sv_chop_right(sv_t sv, u64 size)
sv_t sv_substr(sv_t sv, u64 position, u64 size)
{
return sv_chop_right(sv_chop_left(sv, position), size);
return sv_truncate(sv_chop_left(sv, position), size);
}
sv_t sv_truncate(sv_t sv, u64 newsize)