summaryrefslogtreecommitdiffhomepage
path: root/docs/crandom_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-12-02 14:24:15 +0100
committerTyge Løvset <[email protected]>2020-12-02 14:24:15 +0100
commit64bffee9fffc4cb68e06b395b42275804ccce9b2 (patch)
tree6dab63b853e1cdbcbef1899f511a824d19514f28 /docs/crandom_api.md
parente60e9f398f43ba09a7f0027ac93d4f8f61a9f254 (diff)
downloadSTC-modified-64bffee9fffc4cb68e06b395b42275804ccce9b2.tar.gz
STC-modified-64bffee9fffc4cb68e06b395b42275804ccce9b2.zip
Added carray docs.
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);
}
}