aboutsummaryrefslogtreecommitdiff
path: root/strbuf.c
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-02-22 14:32:21 +0100
committerHugo Hörnquist <hugo@hornquist.se>2019-02-22 14:32:21 +0100
commitf618b5d018983f67714161bd515e2c9e11765e33 (patch)
tree1de04908dfea4dc0c61209a237996f27a0c5b6f0 /strbuf.c
parentBuild, but doesn't link. (diff)
downloadcalp-f618b5d018983f67714161bd515e2c9e11765e33.tar.gz
calp-f618b5d018983f67714161bd515e2c9e11765e33.tar.xz
strbuf
Diffstat (limited to 'strbuf.c')
-rw-r--r--strbuf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/strbuf.c b/strbuf.c
index c2b09a10..02f29336 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -13,10 +13,10 @@
/*
* Giving len < 1 is an error.
*/
-//INIT_F(strbuf, size_t len) {
-strbuf::strbuf (size_t len) {
- this->mem = (char*) calloc(sizeof(*this->mem), len);
- this->alloc = len;
+// INIT_F(strbuf, size_t len) {
+strbuf::strbuf () {
+ this->mem = (char*) calloc(sizeof(*this->mem), 2);
+ this->alloc = 2;
this->ptr = 0;
this->len = 0;
}