From 521d01e8ad87e931af3e9a763cc84a6cf7fe5ee3 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sun, 5 Dec 2021 09:47:21 -0800 Subject: Feat: basic string and memory functions Continue filling out the basic standard lib functions. Included prototypes of the str* and mem* families. Plan to add e(str|mem) and n(str|mem) variants as well. --- src/base/io/read.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/base/io/read.c') diff --git a/src/base/io/read.c b/src/base/io/read.c index d4f7bd9..a972c3e 100644 --- a/src/base/io/read.c +++ b/src/base/io/read.c @@ -35,13 +35,13 @@ io·read(io·Header *io, intptr len, void *buf) io->pos += nr; if(nr < io->cap){ io->g = io->e-nr; - mem·move(io->g, io->b, nr); + mem·move(io->g, nr, io->b); } ic -= nr; continue; } /* move our read bytes into the caller's buffer */ - mem·move(b, io->e+ic, n); + mem·move(b, n, io->e+ic); c -= n; ic += n; b += n; -- cgit v1.2.1