[anjuta] language-support-cpp-java: fixed critical #588112 - infinite loop / freeze



commit 93b0d801c118700da9006b2b8c4855fbe3a57a87
Author: Massimo Corà <mcora src gnome org>
Date:   Thu Jul 30 15:18:01 2009 +0200

    language-support-cpp-java: fixed critical #588112 - infinite loop / freeze
    
    there was an uninitialized value left hanging.

 plugins/language-support-cpp-java/plugin.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plugins/language-support-cpp-java/plugin.c b/plugins/language-support-cpp-java/plugin.c
index 21d01ea..360695b 100644
--- a/plugins/language-support-cpp-java/plugin.c
+++ b/plugins/language-support-cpp-java/plugin.c
@@ -1269,6 +1269,11 @@ get_line_auto_indentation (CppJavaPlugin *plugin, IAnjutaEditor *editor,
 	gboolean colon_indent = FALSE;
 	
 	g_return_val_if_fail (line > 0, 0);
+
+	/* be sure to set a default if we're in the first line otherwise
+	 * the pointer'll be left hanging with no value.
+	 */
+	*line_indent_spaces = 0;
 	
 	if (line == 1) /* First line */
 	{



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