Signed-off-by: Srivardhan Hebbar <email@example.com>
This is changing behaviour.
Before the patch, len = 0 returns "" (packed inside an strbuf).
Now, it returns NULL.
I'm not sure this is the best way to do. Example:
str2 = substr(str1, idx1 - idx2); strbuf_append(str2, "bla bla")
This pseudo-code should always work, even if idx1 == idx2. With your patch it wont work anymore.