[gitg] Fix usage of line content length



commit 09b3c199ae2addab1a938e505734d3f542a88f4d
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Sat Nov 23 19:20:20 2013 +0100

    Fix usage of line content length

 libgitg/gitg-diff-view-request-diff.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libgitg/gitg-diff-view-request-diff.vala b/libgitg/gitg-diff-view-request-diff.vala
index 9ff6800..4831d0f 100644
--- a/libgitg/gitg-diff-view-request-diff.vala
+++ b/libgitg/gitg-diff-view-request-diff.vala
@@ -173,8 +173,10 @@ namespace Gitg
                        {
                                var content = line.get_content();
 
+                               var sc = ((string)content)[0:content.length];
+
                                builder.set_member_name("type").add_int_value((int)line.get_origin());
-                               builder.set_member_name("content").add_string_value((string)content);
+                               builder.set_member_name("content").add_string_value(sc);
                        }
                        builder.end_object();
                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]