One bug fix in strbuf.c and updated corresponding tests