summaryrefslogtreecommitdiffhomepage
path: root/docs/crandom_api.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/crandom_api.md')
-rw-r--r--docs/crandom_api.md3
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/crandom_api.md b/docs/crandom_api.md
index 0d0f415d..ca798d07 100644
--- a/docs/crandom_api.md
+++ b/docs/crandom_api.md
@@ -107,8 +107,7 @@ int main()
c_foreach (i, cvec_e, vhist) {
size_t n = (size_t) (i.val->second * StdDev * Scale * 2.5 / N);
if (n > 0) {
- // Bar string: move new str after freeing current
- cstr_take(&bar, cstr_with_size(n, '*'));
+ cstr_resize(&bar, n, '*');
printf("%4d %s\n", i.val->first, bar.str);
}
}