SF.net SVN: geany: [1767] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Tue Jul 31 17:07:34 UTC 2007
Revision: 1767
http://geany.svn.sourceforge.net/geany/?rev=1767&view=rev
Author: eht16
Date: 2007-07-31 10:07:33 -0700 (Tue, 31 Jul 2007)
Log Message:
-----------
Fix crash when saving a file after setting encoding "None".
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/symbols.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-07-31 15:27:32 UTC (rev 1766)
+++ trunk/ChangeLog 2007-07-31 17:07:33 UTC (rev 1767)
@@ -1,3 +1,10 @@
+2007-07-31 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * po/Makefile.in.in: Removed.
+ * src/symbols.c:
+ Fix crash when saving a file after setting encoding "None".
+
+
2007-07-30 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/tools.c, src/sciwrappers.c, src/callbacks.c, src/search.c:
Modified: trunk/src/symbols.c
===================================================================
--- trunk/src/symbols.c 2007-07-31 15:27:32 UTC (rev 1766)
+++ trunk/src/symbols.c 2007-07-31 17:07:33 UTC (rev 1767)
@@ -348,8 +348,11 @@
tag_names = NULL;
}
- // do this comparison only once
- if (utils_str_equal(doc_list[idx].encoding, "UTF-8")) doc_is_utf8 = TRUE;
+ // encodings_convert_to_utf8_from_charset() fails with charset "None", so skip conversion
+ // for None at this point completely
+ if (utils_str_equal(doc_list[idx].encoding, "UTF-8") ||
+ utils_str_equal(doc_list[idx].encoding, "None"))
+ doc_is_utf8 = TRUE;
for (i = 0; i < (doc_list[idx].tm_file)->tags_array->len; ++i)
{
@@ -363,6 +366,9 @@
-1, doc_list[idx].encoding, TRUE);
else utf8_name = tag->name;
+ if (utf8_name == NULL)
+ continue;
+
symbol = g_new0(GeanySymbol, 1);
if ((tag->atts.entry.scope != NULL) && isalpha(tag->atts.entry.scope[0]))
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list