antirez / antirez/sds

Error in example

Open
#105 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
5.6k
Forks
510
PR merge metrics
No merged PRs in 30d

Description

In the example:

sds s1 = sdsnew("abcd");
sds s2 = sdsempty();
s[1] = 1;
s[2] = 2;
s[3] = '\n';
s2 = sdscatrepr(s2,s1,sdslen(s1));
printf("%s\n", s2);

output> "a\x01\x02\n"

We are editing indices of s but that is not declared, s should be s1.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.