Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #96 from b4n/wip/spellcheck

spellcheck: Fix check for default language if LANG contains UTF-8
  • Loading branch information...
commit 0497aa99d80618f916c7fbbcbda9ada2b2b9f369 2 parents 96ea471 + 5d88549
Enrico Tröger authored April 07, 2013

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  spellcheck/src/speller.c
2  spellcheck/src/speller.c
@@ -267,7 +267,7 @@ gchar *sc_speller_get_default_lang(void)
267 267
 		{	/* if we have something like de_DE.UTF-8, strip everything from the period to the end */
268 268
 			gchar *period = strchr(lang, '.');
269 269
 			if (period != NULL)
270  
-				result = g_strndup(lang, g_utf8_pointer_to_offset(lang, period));
  270
+				result = g_strndup(lang, period - lang);
271 271
 		}
272 272
 	}
273 273
 	else

0 notes on commit 0497aa9

Please sign in to comment.
Something went wrong with that request. Please try again.