diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-09-18 19:30:09 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-09-18 19:30:09 -0400 |
commit | b55c615a126b784c62714cd14048e892b6716991 (patch) | |
tree | 4a230fcb3492c0863bbafae94a77385efef4b8ca /src | |
parent | 98bb7c3dffffb3a8b5d4f66fd919189004e22949 (diff) |
Fix C substring implementation
Diffstat (limited to 'src')
-rw-r--r-- | src/c/urweb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c index 03757de4..cd33a790 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -1912,7 +1912,7 @@ uw_Basis_string uw_Basis_substring(uw_context ctx, uw_Basis_string s, uw_Basis_i return &s[start]; else { uw_Basis_string r = uw_malloc(ctx, len+1); - memcpy(r, s, len); + memcpy(r, s+start, len); r[len] = 0; return r; } |