[gtk+] gtktextview: Fix a definite use of an uninitialised variable



commit 4fc6880d8308b5ff69b72c23920fed75cf3f2661
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Wed Nov 20 17:33:59 2013 +0000

    gtktextview: Fix a definite use of an uninitialised variable
    
    This seems to have been a typo in the original code, and allowed access
    to virtual_cursor_y when it was uninitialised.
    
    Found by scan-build.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712760

 gtk/gtktextview.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index a61dd1e..13bade8 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -8787,7 +8787,7 @@ gtk_text_view_get_virtual_cursor_pos (GtkTextView *text_view,
 
   if (y)
     {
-      if (priv->virtual_cursor_x != -1)
+      if (priv->virtual_cursor_y != -1)
         *y = priv->virtual_cursor_y;
       else
         *y = pos.y + pos.height / 2;


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