Commit 36a8d198 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fix: Make buffer_get_string() respect offsets

parent f58f11f2
......@@ -128,7 +128,7 @@ int buffer_get_string(buffer_t *buffer, const char **string)
/* Actually add a '\0'-termination. */
ret = buffer->buffer;
ret[buffer->fill] = 0;
*string = ret;
*string = ret + buffer->offset;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment