[anjuta-extras] scintilla: Fix a crash when saving an empty file
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta-extras] scintilla: Fix a crash when saving an empty file
- Date: Sat, 15 Oct 2011 15:24:58 +0000 (UTC)
commit 43c52cd225f0ca8a9eb4a7773bf0c839dc68bcf1
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Sat Oct 15 17:24:16 2011 +0200
scintilla: Fix a crash when saving an empty file
plugins/scintilla/text_editor.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/scintilla/text_editor.c b/plugins/scintilla/text_editor.c
index adad16a..b9f4cfe 100644
--- a/plugins/scintilla/text_editor.c
+++ b/plugins/scintilla/text_editor.c
@@ -1718,10 +1718,10 @@ save_to_file (TextEditor *te, gchar *uri, GError **error)
data, size,
&nchars, NULL, error);
}
+ data[size] = '\0';
}
/* Set last content saved to data */
- data[size] = '\0';
g_free (te->last_saved_content);
te->last_saved_content = data;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]