aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2017-04-29 20:33:28 +0100
committerJames Booth <boothj5@gmail.com>2017-04-29 20:33:28 +0100
commitd52355d72ccbebfa82fd5b1166f8d9265ec4ff6c (patch)
tree08e653b2cb3b69d2bb205177d39e1a29bf6242af /src
parent3e18aab9f38fad3cd971ec09684f7e03f299cc87 (diff)
downloadprofani-tty-d52355d72ccbebfa82fd5b1166f8d9265ec4ff6c.tar.gz
Set locale in unit tests
issue #901
Diffstat (limited to 'src')
-rw-r--r--src/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common.c b/src/common.c
index c4b6ace9..fa3af68c 100644
--- a/src/common.c
+++ b/src/common.c
@@ -467,13 +467,13 @@ prof_occurrences(const char *const needle, const char *const haystack, int offse
gchar *needle_last_ch = g_utf8_offset_to_pointer(needle, g_utf8_strlen(needle, -1)- 1);
int needle_last_ch_len = mblen(needle_last_ch, MB_CUR_MAX);
- gunichar before = NULL;
+ gunichar before = 0;
gchar *haystack_before_ch = g_utf8_find_prev_char(haystack, haystack_curr);
if (haystack_before_ch) {
before = g_utf8_get_char(haystack_before_ch);
}
- gunichar after = NULL;
+ gunichar after = 0;
gchar *haystack_after_ch = g_utf8_find_next_char(haystack_curr + strlen(needle) - needle_last_ch_len, NULL);
if (haystack_after_ch) {
after = g_utf8_get_char(haystack_after_ch);