summaryrefslogtreecommitdiff
path: root/lib/std/strbuf.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-10-10 17:19:27 -0700
committerOri Bernstein <ori@eigenstate.org>2015-10-10 17:19:27 -0700
commit776a9e4ed35369c9c8553e3035daa026e00495e9 (patch)
tree99beac4de9952263367f3a3511838b1beea8d356 /lib/std/strbuf.myr
parent954728ed5cc60e638cd858d232c5851f72ad7343 (diff)
downloadmc-776a9e4ed35369c9c8553e3035daa026e00495e9.tar.gz
Some API tweaks to make things match the docs.
Diffstat (limited to 'lib/std/strbuf.myr')
-rw-r--r--lib/std/strbuf.myr2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/strbuf.myr b/lib/std/strbuf.myr
index 3c4b51c..5638799 100644
--- a/lib/std/strbuf.myr
+++ b/lib/std/strbuf.myr
@@ -87,7 +87,7 @@ const sbputb = {sb, v
}
const sbtrim = {sb, len
- iassert(abs(len) <= sb.len, "trim out of range\n")
+ len = min(sb.len, len)
if len < 0
sb.len -= abs(len)
else