Fix offset calculation for g_dpgettext

We need to pass a positive number here.

https://bugzilla.gnome.org/show_bug.cgi?id=745521
This commit is contained in:
Matthias Clasen 2015-03-04 06:03:10 -05:00
parent 2c6443fd29
commit 3ec764d584

View File

@ -229,7 +229,7 @@ shell_util_translate_time_string (const char *str)
setlocale (LC_MESSAGES, locale);
sep = strchr (str, '\004');
res = g_dpgettext (NULL, str, sep ? str - sep : 0);
res = g_dpgettext (NULL, str, sep ? sep - str : 0);
setlocale (LC_MESSAGES, "");