[gnome-shell] Fix offset calculation for g_dpgettext



commit 3ec764d5844efd0fc71ca132efdc3513afc66b56
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Mar 4 06:03:10 2015 -0500

    Fix offset calculation for g_dpgettext
    
    We need to pass a positive number here.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745521

 src/shell-util.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/shell-util.c b/src/shell-util.c
index f922f6e..d6815b9 100644
--- a/src/shell-util.c
+++ b/src/shell-util.c
@@ -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, "");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]