diff options
author | Matthias Clasen <mclasen@redhat.com> | 2008-11-28 07:42:48 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-11-28 07:42:48 +0000 |
commit | e449a91b987beb218ebea6b2aa5a5ae574f3b204 (patch) | |
tree | fb736ecafaef4bb39eecfa701a681deb6ccae088 /gio/gdatainputstream.c | |
parent | 688b2e0ed2fb614c90c7fb0a942c5c3ef8714fa8 (diff) |
Bug 547481 – g_data_input_stream_read_line behaves not as stated in the
2008-11-28 Matthias Clasen <mclasen@redhat.com>
Bug 547481 – g_data_input_stream_read_line behaves not as stated in
the docs
* gdatainputstream.c (g_data_input_stream_read_line): Behave as
documented and include the line end in the returned string.
Pointed out by Paul Pogonyshev.
* tests/data-input-stream.c: Fix the read_line test to test the
documented behaviour.
svn path=/trunk/; revision=7694
Diffstat (limited to 'gio/gdatainputstream.c')
-rw-r--r-- | gio/gdatainputstream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gio/gdatainputstream.c b/gio/gdatainputstream.c index 2c8bcdee3..967c67bb4 100644 --- a/gio/gdatainputstream.c +++ b/gio/gdatainputstream.c @@ -803,7 +803,7 @@ g_data_input_stream_read_line (GDataInputStream *stream, if (length) *length = (gsize)found_pos; g_warn_if_fail (res == found_pos + newline_len); - line[found_pos] = 0; + line[found_pos + newline_len] = 0; return line; } |